るりまサーチ

最速Rubyリファレンスマニュアル検索!
450件ヒット [401-450件を表示] (0.089秒)
トップページ > クエリ:ruby[x] > 種類:インスタンスメソッド[x] > クエリ:r[x] > クエリ:at[x] > クラス:Pathname[x]

別のキーワード

  1. rbconfig ruby
  2. fiddle ruby_free
  3. fiddle build_ruby_platform
  4. rake ruby
  5. rubygems/defaults ruby_engine

ライブラリ

キーワード

検索結果

<< < ... 3 4 5 >>

Pathname#delete -> Integer (3108.0)

self が指すディレクトリあるいはファイルを削除します。

...self が指すディレクトリあるいはファイルを削除します。

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

pathname
= Pathname("/path/to/sample")
pathname
.exist? # => true
pathname
.unlink # => 1
pathname
.exist? # => false
//}...

Pathname#eql?(other) -> bool (3108.0)

パス名を比較し、 other と同じなら真を返します。大文字小文字は区別されます。 other は Pathname オブジェクトでなければなりません。

...パス名を比較し、 other と同じなら真を返します。大文字小文字は区別されます。
other Pathname オブジェクトでなければなりません。

パス名の比較は単純にパス文字列の比較によって行われるので、論理的に
同じパスで...
...@param other 比較対象の Pathname オブジェクトを指定します。

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

p Pathname.new("foo/bar") == Pathname.new("foo/bar")
p Pathname.new("foo/bar") == Pathname.new("foo//bar")
p Pathname.new("foo/../foo/bar") == Pathname.new("foo/bar")

# => true
#...

Pathname#split -> Array (3108.0)

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

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

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

pathname
= Pathname("/path/to/sample")
pathname
.split # => [#<Pathname:/path/to>, #<Pathname:sample>]
//}

@see File.split...

Pathname#to_s -> String (3108.0)

パス名を文字列で返します。

...パス名を文字列で返します。


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

path = Pathname.new("/tmp/hogehoge")
File.open(path)
//}...

Pathname#unlink -> Integer (3108.0)

self が指すディレクトリあるいはファイルを削除します。

...self が指すディレクトリあるいはファイルを削除します。

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

pathname
= Pathname("/path/to/sample")
pathname
.exist? # => true
pathname
.unlink # => 1
pathname
.exist? # => false
//}...

絞り込み条件を変える

<< < ... 3 4 5 >>