るりまサーチ (Ruby 2.4.0)

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

別のキーワード

  1. pathname glob
  2. pathname find
  3. pathname sub
  4. pathname open
  5. pathname ascend

クラス

キーワード

検索結果

Pathname#read(*args) -> String | nil (117376.0)

IO.read(self.to_s, *args)と同じです。

IO.read(self.to_s, *args)と同じです。


@see IO.read

Pathname (114259.0)

パス名をオブジェクト指向らしく扱うクラスです。

...クラスです。

Pathname
オブジェクトはパス名を表しており、ファイルやディレクトリそのものを表してはいません。
当然、存在しないファイルのパス名も扱えます。

絶対パスも相対パスも扱えます。

Pathname
オブジェクト...
...るメソッドはありません。

Pathname
のインスタンスメソッドには、ディレクトリのパスを返す Pathname#dirname のように、
文字列操作だけで結果を返すものもあれば、ファイルの中身を読み出す Pathname#read のように
ファイルシ...
...ムにアクセスするものもあります。

Pathname
オブジェクトの生成には、Pathname.new のほかに Kernel#Pathname も使えます。

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

Pathname
.new("foo/bar") # => #<Pathname:foo/bar>
Pathname
("foo/bar") # => #<Pathname:foo/bar>
//}...

Pathname#readlink -> Pathname (81658.0)

Pathname.new(File.readlink(self.to_s)) と同じです。

...Pathname.new(File.readlink(self.to_s)) と同じです。


@see File.readlink...

Pathname#binread(*args) -> String | nil (81415.0)

IO.binread(self.to_s, *args)と同じです。

...じです。

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

pathname
= Pathname("testfile")
pathname
.binread # => "This is line one\nThis is line two\nThis is line three\nAnd so on...\n"
pathname
.binread(20) # => "This is line one\nThi"
pathname
.binread(20, 10) # => "ne one\nThis is lin...

Pathname#readable? -> bool (81307.0)

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

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


@see FileTest.#readable?

絞り込み条件を変える

Pathname#readable_real? -> bool (81307.0)

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

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


@see FileTest.#readable_real?

Pathname#readlines(*args) -> [String] (81307.0)

IO.readlines(self.to_s, *args)と同じです。

IO.readlines(self.to_s, *args)と同じです。


@see IO.readlines

Pathname#world_readable? -> bool (81307.0)

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

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


@see FileTest.#world_readable?