3件ヒット
[1-3件を表示]
(0.008秒)
検索結果
-
Dir
. chroot(path) -> 0 (18304.0) -
ルートディレクトリを path に変更します。
...トリのパスを文字列で指定します。
@raise Errno::EXXX 失敗した場合に発生します。
//emlist[例][ruby]{
p Dir.glob("*") #=> ["file1", "file2]
Dir.chroot("./")
p Dir.glob("/*") #=> ["/file1", "/file2]
//}
@see http://opengroup.org/onlinepubs/007908799/xsh/chroot.html... -
Dir
. home -> String | nil (76.0) -
現在のユーザまたは指定されたユーザのホームディレクトリを返します。
...されたユーザのホームディレクトリを返します。
Dir.home や Dir.home("root") は
File.expand_path("~") や File.expand_path("~root") と
ほぼ同じです。
//emlist[例][ruby]{
Dir.home # => "/home/vagrant"
Dir.home("root") # => "/root"
//}
@see File.expand_path... -
Dir
. home(user) -> String | nil (76.0) -
現在のユーザまたは指定されたユーザのホームディレクトリを返します。
...されたユーザのホームディレクトリを返します。
Dir.home や Dir.home("root") は
File.expand_path("~") や File.expand_path("~root") と
ほぼ同じです。
//emlist[例][ruby]{
Dir.home # => "/home/vagrant"
Dir.home("root") # => "/root"
//}
@see File.expand_path...