るりまサーチ

最速Rubyリファレンスマニュアル検索!
88件ヒット [1-88件を表示] (0.024秒)
トップページ > クエリ:read[x] > ライブラリ:pathname[x]

別のキーワード

  1. _builtin read
  2. stringio read
  3. io read
  4. csv read
  5. tuple read

クラス

キーワード

検索結果

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

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

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


@see IO.read...

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

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

....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 line "
//}

@see IO.binread...

Pathname#readable? -> bool (6102.0)

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

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


@see FileTest.#readable?...

Pathname#readable_real? -> bool (6102.0)

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

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


@see FileTest.#readable_real?...

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

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

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


@see IO.readlines...

絞り込み条件を変える

Pathname#readlink -> Pathname (6102.0)

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

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


@see File.readlink...

Pathname#world_readable? -> bool (6102.0)

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

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


@see FileTest.#world_readable?...

Pathname (8.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>
//}...