るりまサーチ

最速Rubyリファレンスマニュアル検索!
270件ヒット [1-100件を表示] (0.145秒)
トップページ > クエリ:I[x] > クエリ:b[x] > クラス:Pathname[x]

別のキーワード

  1. _builtin to_i
  2. fiddle to_i
  3. matrix elements_to_i
  4. matrix i
  5. csv to_i

ライブラリ

キーワード

検索結果

<< 1 2 3 > >>

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

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

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


@see IO.binwrite...

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

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

...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(2...
...0, 10) # => "ne one\nThis is line "
//}

@see IO.binread...

Pathname#birthtime -> Time (12201.0)

File.birthtime(self.to_s) を渡したものと同じです。

...File.birthtime(self.to_s) を渡したものと同じです。

@raise NotImplementedError Windows のような birthtime のない環境で発生します。


@see File.birthtime...

Pathname#world_writable? -> bool (12201.0)

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

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


@see FileTest.#world_writable?...

Pathname#writable? -> bool (12201.0)

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

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


@see FileTest.#writable?...

絞り込み条件を変える

Pathname#writable_real? -> bool (12201.0)

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

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


@see FileTest.#writable_real?...

Pathname#realdirpath(basedir = nil) -> Pathname (6301.0)

Pathname#realpath とほぼ同じで、最後のコンポーネントは実際に 存在しなくてもエラーになりません。

...
Pathname
#realpath とほぼ同じで、最後のコンポーネントは実際に
存在しなくてもエラーになりません。

@param basedir ベースディレクトリを指定します。省略するとカレントディレクトリになります。

//emlist[例][ruby]{
require "pathna...
...me"

path = Pathname("/not_exist")
path.realdirpath # => #<Pathname:/not_exist>
path.realpath # => Errno::ENOENT

# 最後ではないコンポーネント(/not_exist_1)も存在しないのでエラーになる。
path = Pathname("/not_exist_1/not_exist_2")
path.realdirpath # => Errno::ENOENT...

Pathname.glob(pattern, flags=0) {|pathname| ...} -> nil (6207.0)

ワイルドカードの展開を行なった結果を、 Pathname オブジェクトの配列として返します。

...
Pathname
オブジェクトの配列として返します。

引数の意味は、Dir.glob と同じです。 flag の初期値である 0 は「何
も指定しない」ことを意味します。

ブロックが与えられたときは、ワイルドカードにマッチした Pathname...
...nil を返します。

@param pattern ワイルドカードパターンです
@param flags パターンマッチ時のふるまいを変化させるフラグを指定します

//emlist[][ruby]{
require "pathname"
Pathname
.glob("lib/i*.rb") # => [#<Pathname:lib/ipaddr.rb>, #<Pathname:lib/irb.rb>...
...]
//}

@see Dir.glob...
...]
//}

@see Dir.glob
@see Pathname#glob...

Pathname#basename(suffix = "") -> Pathname (6201.0)

Pathname.new(File.basename(self.to_s, suffix)) と同じです。

...Pathname.new(File.basename(self.to_s, suffix)) と同じです。

@param suffix サフィックスを文字列で与えます。'.*' という文字列を与えた場合、'*' はワイルドカードとして働き
'.' を含まない任意の文字列にマッチします。

//emli...
...by]{
require "pathname"

Pathname
("ruby/ruby.c").basename #=> #<Pathname:"ruby.c">
Pathname
("ruby/ruby.c").basename(".c") #=> #<Pathname:"ruby">
Pathname
("ruby/ruby.c").basename(".*") #=> #<Pathname:"ruby">
Pathname
("ruby/ruby.exe").basename(".*") #=> #<Pathname:"ruby">
Pathname
("rub...
...y/y.tab.c").basename(".*") #=> #<Pathname:"y.tab">
//}

@see File.basename...

Pathname#directory? -> bool (6201.0)

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

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


@see FileTest.#directory?...

絞り込み条件を変える

<< 1 2 3 > >>