singleton method Dir.home
home -> String | nil
home(user) -> String | nil
-
現在のユーザまたは指定されたユーザのホームディレクトリを返します。
Dir.home や Dir.home("root") は File.expand_path("~") や File.expand_path("~root") と ほぼ同じです。
[SEE_ALSO] File.expand_path
class Dir
home -> String | nil
home(user) -> String | nil
現在のユーザまたは指定されたユーザのホームディレクトリを返します。
Dir.home や Dir.home("root") は File.expand_path("~") や File.expand_path("~root") と ほぼ同じです。
[SEE_ALSO] File.expand_path