るりまサーチ

最速Rubyリファレンスマニュアル検索!
48件ヒット [1-48件を表示] (0.031秒)
トップページ > クエリ:param[x] > クエリ:expand_path[x]

別のキーワード

  1. pathname expand_path
  2. rbconfig expand
  3. file expand_path
  4. _builtin expand_path
  5. text expand_tabs

ライブラリ

クラス

モジュール

検索結果

Pathname#expand_path(default_dir = '.') -> Pathname (18141.0)

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

...w(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...

File.expand_path(path, default_dir = &#39;.&#39;) -> String (18137.0)

path を絶対パスに展開した文字列を返します。 path が相対パスであれば default_dir を基準にします。

..."/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 が...

Shell#expand_path(path) -> String (18113.0)

Fileクラスにある同名のクラスメソッドと同じです.

...Fileクラスにある同名のクラスメソッドと同じです.

@param path ファイル名を表す文字列を指定します。

@see File.expand_path...

Shell::CommandProcessor#expand_path(path) -> String (18113.0)

Fileクラスにある同名のクラスメソッドと同じです.

...Fileクラスにある同名のクラスメソッドと同じです.

@param path ファイル名を表す文字列を指定します。

@see File.expand_path...

Kernel.#require_relative(relative_feature) -> bool (12.0)

現在のファイルからの相対パスで require します。

...で require します。

require File.expand_path(relative_feature, File.dirname(__FILE__))
とほぼ同じです。

Kernel.#eval などで文字列を評価した場合に、そこから
require_relative を呼出すと必ず失敗します。

@param relative_feature ファイル名の文字...

絞り込み条件を変える