ライブラリ
- ビルトイン (164)
- mkmf (60)
-
net
/ ftp (144) - pathname (256)
- psych (36)
- rake (12)
-
rake
/ packagetask (12) -
rubygems
/ commands / which _ command (12) -
rubygems
/ dependency _ installer (12) -
rubygems
/ installer (48) -
rubygems
/ package / tar _ input (12) -
rubygems
/ package / tar _ writer (12) -
rubygems
/ remote _ fetcher (12) -
rubygems
/ source _ index (12) -
rubygems
/ spec _ fetcher (12) -
rubygems
/ specification (24) - shell (72)
-
shell
/ command-processor (48) -
shell
/ filter (48) - un (24)
-
webrick
/ httpresponse (12) -
webrick
/ httpserver (96)
クラス
- Dir (130)
-
File
:: Stat (12) -
Gem
:: Commands :: WhichCommand (12) -
Gem
:: DependencyInstaller (12) -
Gem
:: Installer (48) -
Gem
:: Package :: TarInput (12) -
Gem
:: Package :: TarWriter (12) -
Gem
:: RemoteFetcher (12) -
Gem
:: SourceIndex (12) -
Gem
:: SpecFetcher (12) -
Gem
:: Specification (24) - IO (22)
-
Net
:: FTP (144) - Pathname (256)
-
Psych
:: Handler (12) -
Psych
:: Nodes :: Document (24) -
RDoc
:: Options (48) -
Rake
:: PackageTask (12) - Shell (72)
-
Shell
:: CommandProcessor (48) -
Shell
:: Filter (48) -
WEBrick
:: HTTPResponse (12) -
WEBrick
:: HTTPServer (60) -
WEBrick
:: HTTPServer :: MountTable (36)
モジュール
- Kernel (96)
キーワード
- [] (12)
- []= (12)
-
add
_ bindir (12) - bindir= (12)
-
cache
_ dir (12) - chdir (18)
- children (19)
- cleanpath (12)
- close (2)
- delete (12)
-
dir
_ config (12) -
dir
_ stack (6) - directory (12)
- directory? (42)
- dirname (30)
- dirs (6)
- download (12)
-
dummy
_ makefile (12) - each (24)
-
each
_ child (38) -
each
_ entry (15) - empty? (9)
- entries (12)
-
extract
_ entry (12) - fileno (22)
-
find
_ gems _ with _ sources (12) -
find
_ paths (12) - fnmatch (12)
- fnmatch? (12)
- foreach (18)
-
generate
_ bin _ script (12) -
generate
_ bin _ symlink (12) -
generate
_ windows _ script (12) - getdir (12)
- glob (34)
-
install
_ rb (12) - list (24)
-
load
_ gems _ in (12) - ls (24)
- mkdir (66)
- mount (12)
-
mount
_ proc (24) - nlst (12)
-
op
_ dir (12) -
op
_ dir= (12) - open (18)
- opendir (24)
-
package
_ dir= (12) -
page
_ dir= (12) - pos (12)
- pos= (12)
- pushdir (6)
- pwd (12)
- read (12)
- realdirpath (12)
- realpath (24)
-
relative
_ path _ from (12) - rewind (12)
-
rm
_ f (12) -
rm
_ rf (12) - rmdir (54)
- seek (12)
-
set
_ redirect (12) -
start
_ document (12) -
tag
_ directives (12) -
tag
_ directives= (12) - tell (12)
-
template
_ dir= (12) -
to
_ i (11) - umount (12)
- unlink (18)
- unmount (12)
- unpack (12)
検索結果
先頭5件
-
Net
:: FTP # dir(*args) -> [String] (18133.0) -
LIST コマンドを送信し、結果を返します。
...果を返します。
@param args LIST の引数を文字列で渡します。複数渡すことができます。
@raise Net::FTPTempError 応答コードが 4yz のときに発生します。
@raise Net::FTPPermError 応答コードが 5yz のときに発生します。
@raise Net::FTPProtoError......応答コードが RFC 的に正しくない場合に発生します。
@raise Net::FTPReplyError 応答コードが上の場合以外で正しくない場合(1xy, 3xyが来るべきでないときに来た場合など)に発生します。... -
Net
:: FTP # dir(*args) {|line| . . . } -> nil (18133.0) -
LIST コマンドを送信し、結果を返します。
...果を返します。
@param args LIST の引数を文字列で渡します。複数渡すことができます。
@raise Net::FTPTempError 応答コードが 4yz のときに発生します。
@raise Net::FTPPermError 応答コードが 5yz のときに発生します。
@raise Net::FTPProtoError......応答コードが RFC 的に正しくない場合に発生します。
@raise Net::FTPReplyError 応答コードが上の場合以外で正しくない場合(1xy, 3xyが来るべきでないときに来た場合など)に発生します。... -
Dir
# pos=(pos) (9041.0) -
ディレクトリストリームの読み込み位置を pos に移動させます。 pos は Dir#tell で与えられた値でなければなりま せん。
...動させます。
pos は Dir#tell で与えられた値でなければなりま
せん。
@param pos 変更したい位置を整数で与えます。
@raise IOError 既に自身が close している場合に発生します。
//emlist[例][ruby]{
Dir.open("testdir") do |d|
d.read......# => "."
i = d.tell # => 12
d.read # => ".."
d.seek(i) # => #<Dir:0x401b3c40>
d.read # => ".."
end
//}... -
Dir
# seek(pos) -> self (9041.0) -
ディレクトリストリームの読み込み位置を pos に移動させます。 pos は Dir#tell で与えられた値でなければなりま せん。
...動させます。
pos は Dir#tell で与えられた値でなければなりま
せん。
@param pos 変更したい位置を整数で与えます。
@raise IOError 既に自身が close している場合に発生します。
//emlist[例][ruby]{
Dir.open("testdir") do |d|
d.read......# => "."
i = d.tell # => 12
d.read # => ".."
d.seek(i) # => #<Dir:0x401b3c40>
d.read # => ".."
end
//}... -
Dir
# each _ child -> Enumerator (9037.0) -
ディレクトリの "." と ".." をのぞく各エントリを表す文字列を引数として、 ブロックを評価します。
...合、各エントリを文字列として保持する
Enumerator
オブジェクトを返します。
@raise IOError 既に self が close している場合に発生します。
//emlist[例][ruby]{
Dir.open('.').each_child{|f|
p f
}
#=> "bar"
# "foo"
//}
@see Dir#each
@see Dir.each_child... -
Dir
# each _ child {|item| . . . } -> self (9037.0) -
ディレクトリの "." と ".." をのぞく各エントリを表す文字列を引数として、 ブロックを評価します。
...合、各エントリを文字列として保持する
Enumerator
オブジェクトを返します。
@raise IOError 既に self が close している場合に発生します。
//emlist[例][ruby]{
Dir.open('.').each_child{|f|
p f
}
#=> "bar"
# "foo"
//}
@see Dir#each
@see Dir.each_child... -
Dir
# children -> [String] (9025.0) -
ディレクトリのファイルエントリ名のうち、 "." と ".." をのぞいた配列を返します。
...ディレクトリのファイルエントリ名のうち、
"." と ".." をのぞいた配列を返します。
@raise IOError 既に self が close している場合に発生します。
//emlist[例][ruby]{
Dir.open('.'){|d|
p d.children # => ["bar", "foo"]
}
//}
@see Dir.children... -
Dir
# each -> Enumerator (9025.0) -
ディレクトリの各エントリを表す文字列を引数として、ブロックを評価します。
...場合、各エントリを文字列として保持する
Enumerator
オブジェクトを返します。
@raise IOError 既に自身が close している場合に発生します。
//emlist[例][ruby]{
Dir.open('.').each{|f|
p f
}
#=> "."
# ".."
# "bar"
# "foo"
//}
@see Dir#each_child... -
Dir
# each {|item| . . . } -> self (9025.0) -
ディレクトリの各エントリを表す文字列を引数として、ブロックを評価します。
...場合、各エントリを文字列として保持する
Enumerator
オブジェクトを返します。
@raise IOError 既に自身が close している場合に発生します。
//emlist[例][ruby]{
Dir.open('.').each{|f|
p f
}
#=> "."
# ".."
# "bar"
# "foo"
//}
@see Dir#each_child... -
Dir
# fileno -> Integer (9025.0) -
self に関連づけられたファイル記述子を表す整数を返します。
...by]{
Dir.open("..") { |d| d.fileno } # => 8
//}
本メソッドでは POSIX 2008 で定義されている dirfd() 関数を使用します。
@raise NotImplementedError Windows などの dirfd() 関数が存在しないプラッ
トフォームで発生します。
@rais......e IOError 既に自身が close している場合に発生します。
@see IO#fileno... -
Dir
# read -> String | nil (9025.0) -
ディレクトリストリームから次の要素を読み出して返します。最後の要素 まで読み出していれば nil を返します。
...l を返します。
@raise Errno::EXXX ディレクトリの読み出しに失敗した場合に発生します。
@raise IOError 既に自身が close している場合に発生します。
//emlist[例][ruby]{
require 'tmpdir'
Dir.mktmpdir do |tmpdir|
File.open("#{tmpdir}/test1.txt", "w")......{ |f| f.puts("test1") }
File.open("#{tmpdir}/test2.txt", "w") { |f| f.puts("test2") }
Dir.open(tmpdir) do |d|
p d.read # => "."
p d.read # => ".."
p d.read # => "test1.txt"
p d.read # => "test2.txt"
p d.read # => nil
end
end
//}...