るりまサーチ

最速Rubyリファレンスマニュアル検索!
66件ヒット [1-66件を表示] (0.015秒)
トップページ > クエリ:real[x] > クラス:Pathname[x]

別のキーワード

  1. _builtin readable_real?
  2. _builtin writable_real?
  3. _builtin executable_real?
  4. matrix real
  5. matrix real?

ライブラリ

キーワード

検索結果

Pathname#executable_real? -> bool (6124.0)

FileTest.executable_real?(self.to_s) と同じです。

...FileTest.executable_real?(self.to_s) と同じです。


@see FileTest.#executable_real?...

Pathname#readable_real? -> bool (6124.0)

FileTest.readable_real?(self.to_s) と同じです。

...FileTest.readable_real?(self.to_s) と同じです。


@see FileTest.#readable_real?...

Pathname#writable_real? -> bool (6124.0)

FileTest.writable_real?(self.to_s) と同じです。

...FileTest.writable_real?(self.to_s) と同じです。


@see FileTest.#writable_real?...

Pathname#realdirpath(basedir = nil) -> Pathname (6101.0)

Pathname#realpath とほぼ同じで、最後のコンポーネントは実際に 存在しなくてもエラーになりません。

...
Pathname
#realpath とほぼ同じで、最後のコンポーネントは実際に
存在しなくてもエラーになりません。

@param basedir ベースディレクトリを指定します。省略するとカレントディレクトリになります。

//emlist[例][ruby]{
require "pathna...
...me"

path = Pathname("/not_exist")
path.realdirpath # => #<Pathname:/not_exist>
path.realpath # => Errno::ENOENT

# 最後ではないコンポーネント(/not_exist_1)も存在しないのでエラーになる。
path = Pathname("/not_exist_1/not_exist_2")
path.realdirpath # => Errno::ENOENT...
...//}

@see Pathname#realpath...

Pathname#realpath -> Pathname (6101.0)

余計な "."、".." や "/" を取り除いた新しい Pathname オブジェクトを返します。

...余計な "."、".." や "/" を取り除いた新しい Pathname オブジェクトを返します。

また、ファイルシステムをアクセスし、実際に存在するパスを返します。
シンボリックリンクも解決されます。

self が指すパスが存在しない場...
...equire 'pathname'

Dir.rmdir("/tmp/foo") rescue nil
File.unlink("/tmp/bar/foo") rescue nil
Dir.rmdir("/tmp/bar") rescue nil

Dir.mkdir("/tmp/foo")
Dir.mkdir("/tmp/bar")
File.symlink("../foo", "/tmp/bar/foo")
path = Pathname.new("bar/././//foo/../bar")

Dir.chdir("/tmp")

p path.realpath

#...
...=> ruby 1.8.0 (2003-10-10) [i586-linux]
# #<Pathname:/tmp/bar>
//}

@see Pathname#realdirpath, File.realpath...

絞り込み条件を変える

Pathname#realpath(basedir = nil) -> Pathname (6101.0)

余計な "."、".." や "/" を取り除いた新しい Pathname オブジェクトを返します。

...余計な "."、".." や "/" を取り除いた新しい Pathname オブジェクトを返します。

また、ファイルシステムをアクセスし、実際に存在するパスを返します。
シンボリックリンクも解決されます。

self が指すパスが存在しない場...
...equire 'pathname'

Dir.rmdir("/tmp/foo") rescue nil
File.unlink("/tmp/bar/foo") rescue nil
Dir.rmdir("/tmp/bar") rescue nil

Dir.mkdir("/tmp/foo")
Dir.mkdir("/tmp/bar")
File.symlink("../foo", "/tmp/bar/foo")
path = Pathname.new("bar/././//foo/../bar")

Dir.chdir("/tmp")

p path.realpath

#...
...=> ruby 1.8.0 (2003-10-10) [i586-linux]
# #<Pathname:/tmp/bar>
//}

@see Pathname#realdirpath, File.realpath...