るりまサーチ

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

別のキーワード

  1. psych root
  2. pstore root?
  3. document root
  4. pathname root?
  5. rexml/document root

ライブラリ

キーワード

検索結果

Dir.chroot(path) -> 0 (6101.0)

ルートディレクトリを path に変更します。

...マニュアルの chroot の項も参照して下さい。

@param path ディレクトリのパスを文字列で指定します。

@raise Errno::EXXX 失敗した場合に発生します。

//emlist[例][ruby]{
p Dir.glob("*") #=> ["file1", "file2]
Dir
.chroot("./")
p Dir.glob("/*") #=> ["/fi...
...le1", "/file2]
//}

@see http://opengroup.org/onlinepubs/007908799/xsh/chroot.html...

Dir.home -> String | nil (25.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 や 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 (25.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 や Dir.home("root") は
File.expand_path("~") や File.expand_path("~root") と
ほぼ同じです。

//emlist[例][ruby]{
Dir
.home # => "/home/vagrant"
Dir
.home("root") # => "/root"
//}

@see File.expand_path...