66件ヒット
[1-66件を表示]
(0.015秒)
別のキーワード
ライブラリ
- pathname (66)
キーワード
-
executable
_ real? (11) -
readable
_ real? (11) - realdirpath (11)
- realpath (22)
-
writable
_ real? (11)
検索結果
先頭5件
-
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...