8件ヒット
[1-8件を表示]
(0.061秒)
種類
- インスタンスメソッド (4)
- 特異メソッド (2)
- モジュール関数 (2)
モジュール
- FileUtils (2)
キーワード
-
absolute
_ path (1) - cwd (1)
- dir (1)
- pwd (2)
検索結果
先頭5件
-
FileUtils
. # getwd -> String (63304.0) -
プロセスのカレントディレクトリを文字列で返します。
プロセスのカレントディレクトリを文字列で返します。 -
Shell
# getwd -> String (54304.0) -
カレントディレクトリのパスを文字列で返します。
カレントディレクトリのパスを文字列で返します。
使用例
require 'shell'
sh = Shell.new
p sh.cwd
# 例
#=> "/Users/kouya/tall" -
File
. absolute _ path(file _ name , dir _ string=nil) -> String (18319.0) -
file_name を絶対パスに変換した文字列を返します。
file_name を絶対パスに変換した文字列を返します。
相対パスの場合はカレントディレクトリを基準とします。
dir_string を渡した場合はそのディレクトリを基準とします。
File.expand_path と異なり、 file_name 先頭が "~" である場合
それは展開されません。普通のディレクトリ名として処理されます。
//emlist[例][ruby]{
p Dir.getwd #=> "/home/matz/work/bar"
p ENV["HOME"] #=> "/home/mat... -
FileUtils
. # pwd -> String (18004.0) -
プロセスのカレントディレクトリを文字列で返します。
プロセスのカレントディレクトリを文字列で返します。 -
File
. expand _ path(path , default _ dir = & # 39; . & # 39;) -> String (9319.0) -
path を絶対パスに展開した文字列を返します。 path が相対パスであれば default_dir を基準にします。
path を絶対パスに展開した文字列を返します。
path が相対パスであれば default_dir を基準にします。
先頭の ~ はホームディレクトリ(環境変数 HOME が使われます)に、
~USER はそのユーザのホームディレクトリに展開されます。
//emlist[例][ruby]{
p Dir.getwd #=> "/home/matz/work/foo"
p ENV["HOME"] #=> "/home/matz"
p File.expand_path("..") #=> "/h... -
Shell
# cwd -> String (9004.0) -
カレントディレクトリのパスを文字列で返します。
カレントディレクトリのパスを文字列で返します。
使用例
require 'shell'
sh = Shell.new
p sh.cwd
# 例
#=> "/Users/kouya/tall" -
Shell
# dir -> String (9004.0) -
カレントディレクトリのパスを文字列で返します。
カレントディレクトリのパスを文字列で返します。
使用例
require 'shell'
sh = Shell.new
p sh.cwd
# 例
#=> "/Users/kouya/tall" -
Shell
# pwd -> String (9004.0) -
カレントディレクトリのパスを文字列で返します。
カレントディレクトリのパスを文字列で返します。
使用例
require 'shell'
sh = Shell.new
p sh.cwd
# 例
#=> "/Users/kouya/tall"