るりまサーチ

最速Rubyリファレンスマニュアル検索!
1172件ヒット [101-200件を表示] (0.129秒)
トップページ > クエリ:-[x] > クエリ:r[x] > クエリ:pathname[x]

別のキーワード

  1. _builtin -
  2. open-uri open
  3. irb/input-method new
  4. irb/input-method gets
  5. matrix -

ライブラリ

モジュール

検索結果

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

Pathname#dirname -> Pathname (23335.0)

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

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

//emlist[例][ruby]{
r
equire "pathname"

Pathname
('/usr/bin/shutdown').dirname # => #<Pathname:/usr/bin>
//}

@see File.dirname...

Pathname#readlink -> Pathname (23317.0)

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

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


@see File.readlink...

Pathname#binwrite(string, offset=nil) -> Integer (23300.0)

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

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


@see IO.binwrite...

Pathname#opendir -> Dir (23300.0)

Dir.open(self.to_s, &block) と同じです。

...Dir.open(self.to_s, &block) と同じです。


@see Dir.open...

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

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

@see IO.write...

絞り込み条件を変える

Pathname#each_entry -> Enumerator (23271.0)

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

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

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

//emlist[例][ruby]{
r
equire "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#binread(*args) -> String | nil (23236.0)

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

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

//emlist[例][ruby]{
r
equire "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(2...
...0, 10) # => "ne one\nThis is line "
//}

@see IO.binread...

Pathname#rmtree -> nil (23222.0)

FileUtils.rm_r(self.to_s) と同じです。

...FileUtils.rm_r(self.to_s) と同じです。


@see FileUtils.#rm_r...

Pathname#relative? -> bool (23218.0)

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

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

//emlist[例][ruby]{
r
equire 'pathname'

p = Pathname.new('/im/sure')
p.relative? #=> false

p = Pathname.new('not/so/sure')
p.relative? #=> true
//}...

Pathname#root? -> bool (23218.0)

self がルートディレクトリであれば真を返します。判断は文字列操作によっ て行われ、ファイルシステムはアクセスされません。

...self がルートディレクトリであれば真を返します。判断は文字列操作によっ
て行われ、ファイルシステムはアクセスされません。

//emlist[例][ruby]{
r
equire 'pathname'

Pathname
('/').root? # => true
Pathname
('/im/sure').root? # => false
//}...

絞り込み条件を変える

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