るりまサーチ

最速Rubyリファレンスマニュアル検索!
11件ヒット [1-11件を表示] (0.021秒)
トップページ > クエリ:path[x] > クエリ:require[x] > クラス:Digest::Base[x] > 種類:インスタンスメソッド[x]

別のキーワード

  1. _builtin path
  2. pathname to_path
  3. _builtin absolute_path
  4. _builtin to_path
  5. pstore path

ライブラリ

検索結果

Digest::Base#file(path) -> self (127.0)

ファイル名 file で指定したファイルの内容を読み込んでダイジェストを更新し、 オブジェクト自身を返します。

...@param path 読み込み対象のファイル名です。
@return ダイジェストオブジェクトを返します。

例(MD5の場合)

require
'digest/md5'
digest = Digest::MD5.new
digest.file("/path/to/file") # => Digest::MD5のインスタンス
digest.hexdigest # => "/path/to/file...