るりまサーチ

最速Rubyリファレンスマニュアル検索!
1238件ヒット [201-300件を表示] (0.138秒)

別のキーワード

  1. openssl t61string
  2. asn1 t61string
  3. matrix t
  4. t61string new
  5. fiddle type_size_t

ライブラリ

キーワード

検索結果

<< < 1 2 3 4 5 ... > >>

Pathname#stat -> File::Stat (6202.0)

File.stat(self.to_s) と同じです。

...File.stat(self.to_s) と同じです。


@see File.stat...

Pathname#write(string, offset=nil, **opts) -> Integer (6202.0)

...IO.write(self.to_s, string, offset, **opts)と同じです。

@see IO.write...

Pathname#absolute? -> bool (6102.0)

self が絶対パス指定であれば真を返します。

...self が絶対パス指定であれば真を返します。

//emlist[例][ruby]{
require "pathname"

pathname
= Pathname("/path/to/example.rb")
pathname
.absolute? # => true
pathname
= Pathname("../")
pathname
.absolute? # => false
//}...

Pathname#directory? -> bool (6102.0)

FileTest.directory?(self.to_s) と同じです。

...FileTest.directory?(self.to_s) と同じです。


@see FileTest.#directory?...

Pathname#each_entry -> Enumerator (6102.0)

Dir.foreach(self.to_s) {|f| yield Pathname.new(f) } と同じです。

...(self.to_s) {|f| yield Pathname.new(f) } と同じです。

ブロックを省略した場合は Enumerator を返します。

//emlist[例][ruby]{
require "pathname"

Pathname
("/usr/local").each_entry {|f| p f }

# => #<Pathname:.>
# => #<Pathname:..>
# => #<Pathname:bin>
# => #<Pathname:etc>
# =...
...> #<Pathname:include>
# => #<Pathname:lib>
# => #<Pathname:opt>
//}

@see Dir.foreach...

絞り込み条件を変える

Pathname#each_entry {|pathname| ... } -> nil (6102.0)

Dir.foreach(self.to_s) {|f| yield Pathname.new(f) } と同じです。

...(self.to_s) {|f| yield Pathname.new(f) } と同じです。


//emlist[例][ruby]{
require "pathname"

Pathname
("/usr/local").each_entry {|f| p f }

# => #<Pathname:.>
# => #<Pathname:..>
# => #<Pathname:bin>
# => #<Pathname:etc>
# => #<Pathname:include>
# => #<Pathname:lib>
# => #<Pathname:opt>
//}...
...(self.to_s) {|f| yield Pathname.new(f) } と同じです。

ブロックを省略した場合は Enumerator を返します。

//emlist[例][ruby]{
require "pathname"

Pathname
("/usr/local").each_entry {|f| p f }

# => #<Pathname:.>
# => #<Pathname:..>
# => #<Pathname:bin>
# => #<Pathname:etc>
# =...
...> #<Pathname:include>
# => #<Pathname:lib>
# => #<Pathname:opt>
//}

@see Dir.foreach...

Pathname#empty? -> bool (6102.0)

ディレクトリに対しては Dir.empty?(self.to_s) と同じ、他に対しては FileTest.empty?(self.to_s) と同じです。

...Dir.empty?(self.to_s) と同じ、他に対しては FileTest.empty?(self.to_s) と同じです。

//emlist[例 ディレクトリの場合][ruby]{
require "pathname"
require 'tmpdir'

Pathname
("/usr/local").empty? # => false
Dir.mktmpdir { |dir| Pathname(dir).empty? } # => true
//}...
...//emlist[例 ファイルの場合][ruby]{
require "pathname"
require 'tempfile'

Pathname
("testfile").empty? # => false
T
empfile.create("tmp") { |tmp| Pathname(tmp).empty? } # => true
//}

@see Dir.empty?, FileTest.#empty?, Pathname#zero?...

Pathname#entries -> [Pathname] (6102.0)

self に含まれるファイルエントリ名を元にした Pathname オブジェクトの配列を返します。

...した Pathname オブジェクトの配列を返します。

@raise Errno::EXXX self が存在しないパスであったりディレクトリでなければ例外が発生します。

//emlist[例][ruby]{
require 'pathname'
require 'pp'

pp Pathname('/usr/local').entries
# => [#<Pathname:.>,
#...
...#<Pathname:..>,
# #<Pathname:bin>,
# #<Pathname:etc>,
# #<Pathname:include>,
# #<Pathname:lib>,
# #<Pathname:opt>,
# #<Pathname:sbin>,
# #<Pathname:share>,
# #<Pathname:var>]
//}

@see Dir.entries...

Pathname#executable? -> bool (6102.0)

FileTest.executable?(self.to_s) と同じです。

...FileTest.executable?(self.to_s) と同じです。


@see FileTest.#executable?...

Pathname#executable_real? -> bool (6102.0)

FileTest.executable_real?(self.to_s) と同じです。

...FileTest.executable_real?(self.to_s) と同じです。


@see FileTest.#executable_real?...

絞り込み条件を変える

Pathname#exist? -> bool (6102.0)

FileTest.exist?(self.to_s) と同じです。

...FileTest.exist?(self.to_s) と同じです。


@see FileTest.#exist?...
<< < 1 2 3 4 5 ... > >>