るりまサーチ (Ruby 2.2.0)

最速Rubyリファレンスマニュアル検索!
2件ヒット [1-2件を表示] (0.024秒)
トップページ > バージョン:2.2.0[x] > クラス:Dir[x] > クエリ:File.expand_path[x]

別のキーワード

  1. argf.class lines
  2. argf.class each
  3. argf.class each_line
  4. argf.class gets
  5. argf.class to_a

ライブラリ

検索結果

Dir.home -> String | nil (58.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 (58.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...