るりまサーチ

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

別のキーワード

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

検索結果

<< 1 2 > >>

Pathname#expand_path(default_dir = &#39;.&#39;) -> Pathname (18135.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 (18125.0)

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

...matz/work/foo"
p ENV["HOME"] #=> "/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 パスを表す文字...

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

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

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

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

@see File.expand_path...

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

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

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

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

@see File.expand_path...

DOSISH 対応 (18.0)

DOSISH 対応 ruby version 1.7 では、DOSISH対応(DOS/Windows のパス名の扱いに対する変 更)が含まれています。(現在の)変更点を以下に示します。

...れに準じた
結果を返します。

: File.expand_path

ドライブレター対応に関して、下記のような案が提示されています。

Dir.chdir("D:/")
p File.expand_path("C:foo", "C:/bar")
p File.expand_path("D:foo", "C:/bar")

=> ruby 1.6.4 (2001-06-04) [i...

絞り込み条件を変える

Dir.home -> String | nil (18.0)

現在のユーザまたは指定されたユーザのホームディレクトリを返します。

...れたユーザのホームディレクトリを返します。

Dir.home や Dir.home("root") は
File.expand_path("~") や File.expand_path("~root") と
ほぼ同じです。

//emlist[例][ruby]{
Dir.home # => "/home/vagrant"
Dir.home("root") # => "/root"
//}

@see File.expand_path...
...されたユーザのホームディレクトリを返します。

Dir.home や Dir.home("root") は
File.expand_path("~") や File.expand_path("~root") と
ほぼ同じです。

//emlist[例][ruby]{
Dir.home # => "/home/vagrant"
Dir.home("root") # => "/root"
//}

@see File.expand_path...

Dir.home(user) -> String | nil (18.0)

現在のユーザまたは指定されたユーザのホームディレクトリを返します。

...れたユーザのホームディレクトリを返します。

Dir.home や Dir.home("root") は
File.expand_path("~") や File.expand_path("~root") と
ほぼ同じです。

//emlist[例][ruby]{
Dir.home # => "/home/vagrant"
Dir.home("root") # => "/root"
//}

@see File.expand_path...
...されたユーザのホームディレクトリを返します。

Dir.home や Dir.home("root") は
File.expand_path("~") や File.expand_path("~root") と
ほぼ同じです。

//emlist[例][ruby]{
Dir.home # => "/home/vagrant"
Dir.home("root") # => "/root"
//}

@see File.expand_path...

ruby 1.6 feature (18.0)

ruby 1.6 feature ruby version 1.6 は安定版です。この版での変更はバグ修正がメイン になります。

...ラリロードの実行速度が低下するのだそ
うです) ((<ruby-dev:18145>))

: 2002-08-20 File.expand_path

Cygwin 1.3.x ((<ruby-bugs-ja:PR#299>))

p File.expand_path('file', 'c:/')

=> ruby 1.6.7 (2002-03-01) [i586-linux]
/tmp/c:/file
=> ruby 1.6.7...
...)

net/protocol は削除される方向にあるようで、その準備時に
エンバグしたそうです。

: 2002-03-20 ((<File/File.expand_path>))

メモリの解放洩れがありました。((<ruby-bugs:PR#276>))

: 2002-03-18 文字列リテラル

漢字コードの扱いが #{...

File.absolute_path(file_name, dir_string=nil) -> String (12.0)

file_name を絶対パスに変換した文字列を返します。

...はカレントディレクトリを基準とします。
dir_string を渡した場合はそのディレクトリを基準とします。

File.expand_path と異なり、 file_name 先頭が "~" である場合
それは展開されません。普通のディレクトリ名として処理されま...
...ME"] #=> "/home/matz"
p File.absolute_path("..") #=> "/home/matz/work"
p File.absolute_path("..", "/tmp") #=> "/"
p File.absolute_path("~") #=> "/home/matz/work/bar/~"
p File.absolute_path("~foo") #=> "/home/matz/work/bar/~foo"
//}

@see File.expand_path...
...OME"] #=> "/home/matz"
p File.absolute_path("..") #=> "/home/matz/work"
p File.absolute_path("..", "/tmp") #=> "/"
p File.absolute_path("~") #=> "/home/matz/work/bar/~"
p File.absolute_path("~foo") #=> "/home/matz/work/bar/~foo"
//}

@see File.expand_path...

1.6.8から1.8.0への変更点(まとめ) (6.0)

1.6.8から1.8.0への変更点(まとめ) * ((<1.6.8から1.8.0への変更点(まとめ)/インタプリタの変更>)) * ((<1.6.8から1.8.0への変更点(まとめ)/追加されたクラス/モジュール>)) * ((<1.6.8から1.8.0への変更点(まとめ)/追加されたメソッド>)) * ((<1.6.8から1.8.0への変更点(まとめ)/追加された定数>)) * ((<1.6.8から1.8.0への変更点(まとめ)/拡張されたクラス/メソッド(互換性のある変更)>)) * ((<1.6.8から1.8.0への変更点(まとめ)/変更されたクラス/メソッド(互換性のない変更)>)) * ((<1.6.8から1.8.0への変更点(まとめ)/文法の変更>)) * ((<1.6.8から1.8.0への変更点(まとめ)/正規表現>)) * ((<1.6.8から1.8.0への変更点(まとめ)/Marshal>)) * ((<1.6.8から1.8.0への変更点(まとめ)/Windows 対応>)) * ((<1.6.8から1.8.0への変更点(まとめ)/廃止された(される予定の)機能>)) * ((<1.6.8から1.8.0への変更点(まとめ)/ライブラリ>)) * ((<1.6.8から1.8.0への変更点(まとめ)/拡張ライブラリAPI>)) * ((<1.6.8から1.8.0への変更点(まとめ)/バグ修正>)) * ((<1.6.8から1.8.0への変更点(まとめ)/サポートプラットフォームの追加>))

...: cygwin

cygwinでは常にバイナリモードになりました(((<ruby-dev:19583>)))

: ((<File/File.dirname>)) [CHANGE]
: ((<File/File.expand_path>)) [CHANGE]
: ((<File/File.join>)) [CHANGE]

DOSISHなプラットフォームでのドライブレター対応が強化されました。...

絞り込み条件を変える

<< 1 2 > >>