るりまサーチ (Ruby 2.6.0)

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

別のキーワード

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

クラス

キーワード

検索結果

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

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

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


@see IO.read

Pathname#binread(*args) -> String | nil (18307.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 (18307.0)

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

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


@see FileTest.#readable?

Pathname#readable_real? -> bool (18307.0)

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

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


@see FileTest.#readable_real?

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

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

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


@see IO.readlines

絞り込み条件を変える

Pathname#readlink -> Pathname (18307.0)

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

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


@see File.readlink...

Pathname#world_readable? -> bool (18307.0)

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

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


@see FileTest.#world_readable?

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