るりまサーチ

最速Rubyリファレンスマニュアル検索!
33件ヒット [1-33件を表示] (0.028秒)

別のキーワード

  1. _builtin path
  2. pathname to_path
  3. _builtin absolute_path
  4. _builtin to_path
  5. pstore path

ライブラリ

クラス

キーワード

検索結果

Pathname.pwd -> Pathname (18207.0)

カレントディレクトリを元に Pathname オブジェクトを生成します。 Pathname.new(Dir.getwd) と同じです。

...カレントディレクトリを元に Pathname オブジェクトを生成します。
Path
name.new(Dir.getwd) と同じです。

//emlist[例][ruby]{
require
"pathname"

Path
name.getwd #=> #<Pathname:/home/zzak/projects/ruby>
//}

@see Dir.getwd...

Pathname#expand_path(default_dir = &#39;.&#39;) -> Pathname (9283.0)

Pathname.new(File.expand_path(self.to_s, *args)) と同じです。

...Pathname.new(File.expand_path(self.to_s, *args)) と同じです。

@param default_dir self が相対パスであれば default_dir を基準に展開されます。

//emlist[例][ruby]{
require
"pathname"

path
= Pathname("testfile")
Path
name.pwd # => #<Pathname:/path/to>
path
.expand_...
...path # => #<Pathname:/path/to/testfile>
path
.expand_path("../") # => #<Pathname:/path/testfile>
//}

@see File.expand_path...

Pathname.getwd -> Pathname (3107.0)

カレントディレクトリを元に Pathname オブジェクトを生成します。 Pathname.new(Dir.getwd) と同じです。

...カレントディレクトリを元に Pathname オブジェクトを生成します。
Path
name.new(Dir.getwd) と同じです。

//emlist[例][ruby]{
require
"pathname"

Path
name.getwd #=> #<Pathname:/home/zzak/projects/ruby>
//}

@see Dir.getwd...