1247件ヒット
[201-300件を表示]
(0.028秒)
ライブラリ
- ビルトイン (72)
- digest (12)
- etc (12)
-
json
/ add / exception (12) - logger (12)
- mkmf (24)
-
net
/ ftp (20) -
net
/ http (72) - optparse (24)
- pathname (579)
- rake (12)
-
rake
/ packagetask (12) -
rexml
/ document (72) - rubygems (12)
-
rubygems
/ commands / which _ command (12) -
rubygems
/ custom _ require (12) -
rubygems
/ require _ paths _ builder (12) -
rubygems
/ specification (48) - shell (48)
-
shell
/ command-processor (12) -
shell
/ filter (12) - socket (48)
- tempfile (60)
- uri (36)
クラス
- Addrinfo (36)
-
Digest
:: Base (12) - Exception (12)
-
File
:: Stat (24) -
Gem
:: Commands :: WhichCommand (12) -
Gem
:: Specification (48) - IO (36)
- LoadError (12)
- Logger (12)
-
Net
:: FTP (20) -
Net
:: HTTP (12) -
Net
:: HTTPGenericRequest (36) -
Net
:: HTTPResponse (24) - OptionParser (24)
- Pathname (579)
-
REXML
:: Element (36) -
REXML
:: Elements (36) -
Rake
:: DefaultLoader (12) -
Rake
:: PackageTask (12) -
RubyVM
:: InstructionSequence (12) - Shell (48)
-
Shell
:: CommandProcessor (12) -
Shell
:: Filter (12) - Tempfile (60)
- UNIXSocket (12)
-
URI
:: Generic (24) -
URI
:: HTTP (12)
モジュール
-
Gem
:: RequirePathsBuilder (12) - Kernel (48)
キーワード
- + (12)
-
/ (11) - <=> (24)
- == (12)
- === (12)
- absolute? (12)
- ascend (24)
- atime (12)
- basename (12)
- binread (12)
-
body
_ stream (12) -
body
_ stream= (12) - cd (6)
- chdir (6)
- children (12)
- chown (12)
- cleanpath (12)
- close (12)
- close! (12)
-
create
_ makefile (12) - ctime (12)
- delete (24)
-
delete
_ all (12) - descend (24)
-
dir
_ config (12) - dirname (12)
- each (12)
-
each
_ child (24) -
each
_ entry (15) -
each
_ filename (12) -
each
_ line (24) - empty? (9)
- entries (12)
- eql? (12)
-
family
_ addrinfo (24) - fdatasync (12)
- file (12)
- find (24)
- flush (12)
- fnmatch (12)
- foreach (18)
- formatter (12)
- gem (12)
-
gem
_ paths (12) -
get
_ text (12) - glob (16)
- head (12)
- join (12)
- load (12)
- mkdir (18)
- mlsd (20)
- mountpoint? (12)
-
package
_ dir _ path (12) - parent (12)
- pathconf (12)
-
program
_ name (12) -
program
_ name= (12) - pushd (6)
- pushdir (6)
-
read
_ body (24) - realdirpath (12)
- realpath (24)
- relative? (12)
-
relative
_ path _ from (12) -
request
_ uri (12) -
require
_ path (12) -
require
_ path= (12) -
require
_ paths (12) -
require
_ paths= (12) - root? (12)
- select (12)
- size? (12)
- split (12)
- sub (24)
-
sub
_ ext (12) -
system
_ path (6) -
system
_ path= (6) - text (12)
-
to
_ a (24) -
to
_ json (12) -
to
_ s (12) -
unix
_ path (12) - unlink (24)
-
write
_ require _ paths _ file _ if _ needed (12) - xpath (12)
検索結果
先頭5件
-
Pathname
# realpath(basedir = nil) -> Pathname (9219.0) -
余計な "."、".." や "/" を取り除いた新しい Pathname オブジェクトを返します。
...余計な "."、".." や "/" を取り除いた新しい Pathname オブジェクトを返します。
また、ファイルシステムをアクセスし、実際に存在するパスを返します。
シンボリックリンクも解決されます。
self が指すパスが存在しない場......{
require 'pathname'
Dir.rmdir("/tmp/foo") rescue nil
File.unlink("/tmp/bar/foo") rescue nil
Dir.rmdir("/tmp/bar") rescue nil
Dir.mkdir("/tmp/foo")
Dir.mkdir("/tmp/bar")
File.symlink("../foo", "/tmp/bar/foo")
path = Pathname.new("bar/././//foo/../bar")
Dir.chdir("/tmp")
p path.realpath......# => ruby 1.8.0 (2003-10-10) [i586-linux]
# #<Pathname:/tmp/bar>
//}
@see Pathname#realdirpath, File.realpath... -
Shell
# system _ path=(path) (6228.0) -
コマンドサーチパスの配列を返す。
...コマンドサーチパスの配列を返す。
@param path コマンドサーチパスの配列を指定します。
使用例
require 'shell'
sh = Shell.new
sh.system_path = [ "./" ]
p sh.system_path #=> ["./"]... -
Addrinfo
# unix _ path -> String (6130.0) -
Unix domain socket の path を文字列で返します。
...Unix domain socket の path を文字列で返します。
require 'socket'
Addrinfo.unix("/tmp/sock").unix_path #=> "/tmp/sock"
@raise SocketError アドレスが Unix domain socket のものでない場合に発生します... -
Shell
# system _ path -> Array (6128.0) -
コマンドサーチパスの配列を返す。
...コマンドサーチパスの配列を返す。
@param path コマンドサーチパスの配列を指定します。
使用例
require 'shell'
sh = Shell.new
sh.system_path = [ "./" ]
p sh.system_path #=> ["./"]... -
Gem
:: Commands :: WhichCommand # gem _ paths(spec) -> Array (6117.0) -
与えられた Gem::Specification のインスタンスからその Gem が require するファイルのあるディレクトリをまとめて返します。
...与えられた Gem::Specification のインスタンスからその Gem が
require するファイルのあるディレクトリをまとめて返します。
@param spec Gem::Specification のインスタンスを指定します。... -
Rake
:: PackageTask # package _ dir _ path -> String (6114.0) -
パッケージに含むファイルを配置するディレクトリを返します。
...パッケージに含むファイルを配置するディレクトリを返します。
//emlist[][ruby]{
# Rakefile での記載例とする
require 'rake/packagetask'
Rake::PackageTask.new("sample", "1.0.0") do |package_task|
package_task.package_dir_path # => "pkg/sample-1.0.0"
end
//}... -
IO
# pathconf(name) -> Integer | nil (6107.0) -
fpathconf(3) で取得したファイルの設定変数の値を返します。
...fpathconf(3) で取得したファイルの設定変数の値を返します。
引数 name が制限に関する設定値であり、設定が制限がない状態の場合は nil
を返します。(fpathconf(3) が -1 を返し、errno が設定されていない
場合)
@param name Etc モジ......ュールの PC_ で始まる定数のいずれかを指定します。
//emlist[][ruby]{
require 'etc'
IO.pipe {|r, w|
p w.pathconf(Etc::PC_PIPE_BUF) # => 4096
}
//}... -
REXML
:: Element # xpath -> String (6107.0) -
文書上の対象の要素にのみマッチする xpath 文字列を返します。
...上の対象の要素にのみマッチする xpath 文字列を返します。
//emlist[][ruby]{
require 'rexml/document'
doc = REXML::Document.new('<a><b/><c/></a>')
c = doc.root.elements[2] # <a> .. </a> の中の <c/> 要素
c # => <c/>
c.xpath # => "/a/c"
doc = REXML::Document.new('<a><b/><b/>......</a>')
b = doc.root.elements[2] # <a> .. </a> の中の2番目の <b/> 要素
b # => <b/>
b.xpath # => "/a/b[2]"
//}... -
Pathname
# each _ child(with _ directory = true) {|pathname| . . . } -> [Pathname] (3207.0) -
self.children(with_directory).each と同じです。
...t[例][ruby]{
require "pathname"
Pathname("/usr/local").each_child {|f| p f }
# => #<Pathname:/usr/local/bin>
# => #<Pathname:/usr/local/etc>
# => #<Pathname:/usr/local/include>
# => #<Pathname:/usr/local/lib>
# => #<Pathname:/usr/local/opt>
# => #<Pathname:/usr/local/sbin>
# => #<Pathname:/usr/loc......al/share>
# => #<Pathname:/usr/local/var>
Pathname("/usr/local").each_child(false) {|f| p f }
# => #<Pathname:bin>
# => #<Pathname:etc>
# => #<Pathname:include>
# => #<Pathname:lib>
# => #<Pathname:opt>
# => #<Pathname:sbin>
# => #<Pathname:share>
# => #<Pathname:var>
//}
@see Pathname#children... -
Pathname
# ascend {|pathname| . . . } -> nil (3167.0) -
self のパス名から親方向に辿っていったときの各パス名を新しい Pathname オ ブジェクトとして生成し、ブロックへの引数として渡して実行します。 ブロックを省略した場合は Enumerator を返します。
... Pathname オ
ブジェクトとして生成し、ブロックへの引数として渡して実行します。
ブロックを省略した場合は Enumerator を返します。
//emlist[例][ruby]{
require 'pathname'
Pathname.new('/path/to/some/file.rb').ascend {|v| p v}
# => #<Pathname:/path/to/......ome/file.rb>
# #<Pathname:/path/to/some>
# #<Pathname:/path/to>
# #<Pathname:/path>
# #<Pathname:/>
Pathname.new('path/to/some/file.rb').ascend {|v| p v}
# => #<Pathname:path/to/some/file.rb>
# #<Pathname:path/to/some>
# #<Pathname:path/to>
# #<Pathname:path>
//}
ファイル...