るりまサーチ (Ruby 3.2)

最速Rubyリファレンスマニュアル検索!
3件ヒット [1-3件を表示] (0.009秒)
トップページ > クラス:Pathname[x] > バージョン:3.2[x] > クエリ:pwd[x]

別のキーワード

  1. pathname pwd
  2. fileutils pwd
  3. dir pwd
  4. ftp pwd
  5. net/ftp pwd

ライブラリ

キーワード

検索結果

Pathname.pwd -> Pathname (45307.0)

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

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

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

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

@see Dir.getwd...

Pathname#expand_path(default_dir = &#39;.&#39;) -> Pathname (22.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")
Pathname
.pwd # => #<Pathname:/path/to>
path.expand_...
...path # => #<Pathname:/path/to/testfile>
path.expand_path("../") # => #<Pathname:/path/testfile>
//}

@see File.expand_path...

Pathname.getwd -> Pathname (7.0)

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

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

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

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

@see Dir.getwd...