4件ヒット
[1-4件を表示]
(0.045秒)
検索結果
先頭4件
-
Dir
. entries(path) -> [String] (703.0) -
ディレクトリ path に含まれるファイルエントリ名の 配列を返します。
...ェクトで指定します。省略した場合は
ファイルシステムのエンコーディングと同じになります。
@raise Errno::EXXX 失敗した場合に発生します。
//emlist[例][ruby]{
Dir.entries('.') #=> [".", "..", "bar", "foo"]
//}
@see Dir.foreach... -
Dir
. entries(path , encoding: Encoding . find("filesystem")) -> [String] (703.0) -
ディレクトリ path に含まれるファイルエントリ名の 配列を返します。
...ェクトで指定します。省略した場合は
ファイルシステムのエンコーディングと同じになります。
@raise Errno::EXXX 失敗した場合に発生します。
//emlist[例][ruby]{
Dir.entries('.') #=> [".", "..", "bar", "foo"]
//}
@see Dir.foreach... -
Dir
. home -> String | nil (385.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 (385.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...