90件ヒット
[1-90件を表示]
(0.112秒)
種類
- 特異メソッド (44)
- インスタンスメソッド (24)
- モジュール関数 (22)
モジュール
- FileUtils (22)
キーワード
-
absolute
_ path (11) - cwd (6)
- dir (6)
- pwd (28)
検索結果
先頭5件
-
FileUtils
. # getwd -> String (24201.0) -
プロセスのカレントディレクトリを文字列で返します。
プロセスのカレントディレクトリを文字列で返します。 -
Dir
. getwd -> String (21207.0) -
カレントディレクトリのフルパスを文字列で返します。
...ィレクトリのフルパスを文字列で返します。
@raise Errno::EXXX カレントディレクトリの取得に失敗した場合に発生します(が、普通は失敗することはありません)。
//emlist[例][ruby]{
Dir.chdir("/tmp") #=> 0
Dir.getwd #=> "/tmp"
//}... -
Shell
# getwd -> String (15201.0) -
カレントディレクトリのパスを文字列で返します。
...カレントディレクトリのパスを文字列で返します。
使用例
require 'shell'
sh = Shell.new
p sh.cwd
# 例
#=> "/Users/kouya/tall"... -
FileUtils
. # pwd -> String (9101.0) -
プロセスのカレントディレクトリを文字列で返します。
プロセスのカレントディレクトリを文字列で返します。 -
Dir
. pwd -> String (6107.0) -
カレントディレクトリのフルパスを文字列で返します。
...ィレクトリのフルパスを文字列で返します。
@raise Errno::EXXX カレントディレクトリの取得に失敗した場合に発生します(が、普通は失敗することはありません)。
//emlist[例][ruby]{
Dir.chdir("/tmp") #=> 0
Dir.getwd #=> "/tmp"
//}... -
File
. absolute _ path(file _ name , dir _ string=nil) -> String (3206.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/matz"
p File.absolute_path("..") #=> "/home/matz/work"
p File.absolute_path("..", "/tmp") #=> "/"
p File.absolute_path("~") #=> "/home/matz/work/bar/~"
p File.a......bsolute_path("~foo") #=> "/home/matz/work/bar/~foo"
//}
@see File.expand_path... -
File
. expand _ path(path , default _ dir = & # 39; . & # 39;) -> String (3106.0) -
path を絶対パスに展開した文字列を返します。 path が相対パスであれば default_dir を基準にします。
...相対パスであれば default_dir を基準にします。
先頭の ~ はホームディレクトリ(環境変数 HOME が使われます)に、
~USER はそのユーザのホームディレクトリに展開されます。
//emlist[例][ruby]{
p Dir.getwd #=> "/home/matz/......home/matz"
p File.expand_path("..") #=> "/home/matz/work"
p File.expand_path("..", "/tmp") #=> "/"
p File.expand_path("~") #=> "/home/matz"
p File.expand_path("~foo") #=> "/home/foo"
//}
@param path パスを表す文字列を指定します。
@param default_dir path が相......対パスであれば default_dir を基準に展開されます。... -
Shell
# dir -> String (3101.0) -
カレントディレクトリのパスを文字列で返します。
...カレントディレクトリのパスを文字列で返します。
使用例
require 'shell'
sh = Shell.new
p sh.cwd
# 例
#=> "/Users/kouya/tall"... -
Shell
# cwd -> String (101.0) -
カレントディレクトリのパスを文字列で返します。
...カレントディレクトリのパスを文字列で返します。
使用例
require 'shell'
sh = Shell.new
p sh.cwd
# 例
#=> "/Users/kouya/tall"... -
Shell
# pwd -> String (101.0) -
カレントディレクトリのパスを文字列で返します。
...カレントディレクトリのパスを文字列で返します。
使用例
require 'shell'
sh = Shell.new
p sh.cwd
# 例
#=> "/Users/kouya/tall"...