るりまサーチ

最速Rubyリファレンスマニュアル検索!
132件ヒット [1-100件を表示] (0.099秒)
トップページ > クエリ:t[x] > クエリ: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 (27335.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...

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

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

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

先頭の ~ はホームディレクトリ(環境変数 HOME が使われます)に、
~USER はそのユーザのホームディレクトリに展開されます。...
...//emlist[例][ruby]{
p Dir.getwd #=> "/home/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 パスを表す文字列を指定します。

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

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

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

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

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

@see File.expand_path...

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

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

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

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

@see File.expand_path...

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

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

...equire します。

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

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

@param relative_feature ファイル名の文字列で...
...扱い方はKernel.#loadでも同様です。

//emlist[例][ruby]{
# ---------- some.rb -----------
$a = 1
@a = 1
A = 1
a = 1
# ---------- end some.rb -------

require 'some'
p $a #=> 1
p @a #=> 1
p A #=> 1
p a # undefined local variable or method `a' for #<Object:0x294f9ec @a=1> (NameError)
//}...

絞り込み条件を変える

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

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.absolute_path("~foo") #=> "/home/matz/work/bar/~...
...foo"
//}

@see File.expand_path...

rdoc/generator/json_index (6006.0)

他のジェネレータが生成する HTML で検索が行えるように、JSON の検索インデッ クスを生成するサブライブラリです。

...ータが生成する HTML で検索が行えるように、JSON の検索インデッ
クスを生成するサブライブラリです。

T
his generator is derived from sdoc by Vladimir Kolesnikov and
contains verbatim code written by him.

このジェネレータは HTML ジェネレータと一...
...ています。:

class RDoc::Generator::Darkfish
def initialize options
# ...
@base_dir = Pathname.pwd.expand_path

@json_index = RDoc::Generator::JsonIndex.new self, options
end

def generate
# ...
@json_index.generate
end
end

=== インデック...
...ます。search_data という
グローバル変数に以下のような内容で出力されます。

var search_data = {
"index": {
"searchIndex":
["a", "b", ...],
"longSearchIndex":
["a", "a::b", ...],
"info": [
["A", "A", "A.html", "", ""],...

ruby 1.6 feature (3228.0)

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

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

((<stable-snapshot|URL:ftp://ftp.netlab.co.jp/pub/lang/ruby/stable-snapshot.tar.gz>)) は、日々更新される安定版の最新ソースです。

== 1.6.8 (2002-12-24) -> stable...
...-snapshot

: 2003-01-22: errno

EAGAIN と EWOULDBLOCK が同じ値のシステムで、EWOULDBLOCK がなくなっ
ていました。現在は、このようなシステムでは、EWOULDBLOCK は、EAGAIN
として定義されています。(これは 1.6.7 とは異なる挙動です...
...5>))

: 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 (2002-08-21) [i586-linux]
c:/file

: 2002-08-19 Thread (win)

Ruby の...

DOSISH 対応 (3018.0)

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

...、これらの変更は platform/mswin32 版、platform/mingw32
版の Ruby にのみあてはまります。

とりあえずの目標として、

* \ も / と同様パスセパレータとして扱う
* マルチバイトパス名への対応("表" など 2 byte 目が 0x5c(`\') である文...
...ブレター対応

への対応が挙げられていますが、ドライブレター対応などの微妙な部分については現在もruby-listなどで議論が継続されています。
現時点では、Fileの各メソッドに対する\対応, マルチバイトパス名対応, UNC 対...
....split

File.dirname と File.basename が変更されているので、File.split もそれに準じた
結果を返します。

: File.expand_path

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

Dir.chdir("D:/")
p File.expand_path("C:f...

Dir.home -> String | nil (118.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...

絞り込み条件を変える

<< 1 2 > >>