るりまサーチ

最速Rubyリファレンスマニュアル検索!
1116件ヒット [1-100件を表示] (0.128秒)

別のキーワード

  1. _builtin file?
  2. _builtin file
  3. file atime
  4. file open

モジュール

キーワード

検索結果

<< 1 2 3 ... > >>

File#path -> String (27163.0)

オープン時に使用したパスを文字列で返します。

...
File
::Constants::TMPFILEオプション付きで作成されていたりする場合です。

//emlist[例][ruby]{
File
.open("testfile") {|f| f.path } #=> "testfile"
File
.open("/tmp/../tmp/xxx", "w") {|f| f.path } #=> "/tmp/../tmp/xxx"
File
.open("/tmp", File::R...
...DWR | File::TMPFILE){|f| f.path } #=> "/tmp"
//}...
...Error TMPFILE File::Constants::TMPFILEオプション付きで作成されている場合に発生します。

//emlist[例][ruby]{
File
.open("testfile") {|f| f.path } #=> "testfile"
File
.open("/tmp/../tmp/xxx", "w") {|f| f.path } #=> "/tmp/../tmp/xxx"
File
.open("/...
...tmp", File::RDWR | File::TMPFILE){|f| f.path } # IOError: File is unnamed (TMPFILE?)
//}...

Zlib::GzipFile#path -> String (21118.0)

関連付けられている IO オブジェクトのパスを返します。 このメソッドは IO オブジェクトが path というメソッドを持つ場合のみ定義されます。

...関連付けられている IO オブジェクトのパスを返します。
このメソッドは IO オブジェクトが path というメソッドを持つ場合のみ定義されます。...

Tempfile#path -> String | nil (21114.0)

テンポラリファイルのパス名を返します。

...テンポラリファイルのパス名を返します。

Tempfile#close! を実行後だった場合にはnilを返します。

require "tempfile"
tf = Tempfile.new("hoo")
p tf.path # => "/tmp/hoo.10596.0"
tf.close!
p tf.path # => nil...

Gem::ConfigFile#path -> String (21102.0)

Gem を探索するパスを返します。

Gem を探索するパスを返します。

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

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

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

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

例(MD5の場合)

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

絞り込み条件を変える

RubyVM::InstructionSequence#path -> String (18132.0)

self が表す命令シーケンスの相対パスを返します。

...ompiled>@<compiled>>
iseq.path
# => "<compiled>"

例2: RubyVM::InstructionSequence.compile_file を使用した場合

# /tmp/method.rb
def hello
puts "hello, world"
end

# irb
> iseq = RubyVM::InstructionSequence.compile_file('method.rb')
> iseq.path # => "method.rb"

@see Ruby...
...VM::InstructionSequence#absolute_path...

LoadError#path -> String | nil (18120.0)

Kernel.#require や Kernel.#load に失敗したパスを返します。

...Kernel.#require や Kernel.#load に失敗したパスを返します。

begin
require 'this/file/does/not/exist'
rescue LoadError => e
e.path # => 'this/file/does/not/exist'
end

パスが定まらない場合は nil を返します。...

ARGF.class#path -> String (18102.0)

現在開いている処理対象のファイル名を返します。

...は - を返します。
組み込み変数 $FILENAME と同じです。

$ echo "foo" > foo
$ echo "bar" > bar
$ echo "glark" > glark

$ ruby argf.rb foo bar glark

ARGF.filename # => "foo"
ARGF.read(5) # => "foo\nb"
ARGF.filename # => "bar"
ARGF.skip
ARGF.filename # => "glark"...

Gem::RequirePathsBuilder#write_require_paths_file_if_needed(spec = @spec, gem_home = @gem_home) (15202.0)

必要であれば、'.require_paths' というファイルを Gem ごとに作成します。

...必要であれば、'.require_paths' というファイルを Gem ごとに作成します。...

File#to_path -> String (15163.0)

オープン時に使用したパスを文字列で返します。

...Error TMPFILE File::Constants::TMPFILEオプション付きで作成されている場合に発生します。

//emlist[例][ruby]{
File
.open("testfile") {|f| f.path } #=> "testfile"
File
.open("/tmp/../tmp/xxx", "w") {|f| f.path } #=> "/tmp/../tmp/xxx"
File
.open("/...
...tmp", File::RDWR | File::TMPFILE){|f| f.path } # IOError: File is unnamed (TMPFILE?)
//}...

絞り込み条件を変える

<< 1 2 3 ... > >>