114件ヒット
[101-114件を表示]
(0.109秒)
ライブラリ
- pathname (114)
キーワード
- ascend (22)
- descend (22)
-
each
_ child (22) -
each
_ entry (4) -
each
_ line (22) - find (22)
検索結果
先頭2件
-
Pathname
# find(ignore _ error: true) {|pathname| . . . } -> nil (9.0) -
self 配下のすべてのファイルやディレクトリを 一つずつ引数 pathname に渡してブロックを実行します。
...ァイルやディレクトリを
一つずつ引数 pathname に渡してブロックを実行します。
require 'find'
Find.find(self.to_s) {|f| yield Pathname.new(f)}
と同じです。
ブロックを省略した場合は Enumerator を返します。
@param ignore_error 探索中に... -
Pathname
# each _ child(with _ directory = true) {|pathname| . . . } -> [Pathname] (3.0) -
self.children(with_directory).each と同じです。
...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/local/shar......e>
# => #<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...