るりまサーチ

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

別のキーワード

  1. string b
  2. _builtin b
  3. b string
  4. b _builtin

クラス

キーワード

検索結果

<< 1 2 3 ... > >>

Pathname#absolute? -> bool (6102.0)

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

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

//emlist[例][ruby]{
require "pathname"

pathname
= Pathname("/path/to/example.rb")
pathname
.absolute? # => true
pathname
= Pathname("../")
pathname
.absolute? # => false
//}...

Pathname#basename(suffix = "") -> Pathname (6102.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#binread(*args) -> String | nil (6102.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#binwrite(string, offset=nil) -> Integer (6102.0)

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

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


@see IO.binwrite...

Pathname#birthtime -> Time (6102.0)

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

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

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


@see File.birthtime...

絞り込み条件を変える

Pathname#blockdev? -> bool (6102.0)

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

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


@see FileTest.#blockdev?...

Pathname#executable? -> bool (6102.0)

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

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


@see FileTest.#executable?...

Pathname#executable_real? -> bool (6102.0)

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

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


@see FileTest.#executable_real?...

Pathname#glob(pattern, flags=0) -> [Pathname] (6102.0)

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

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

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

ブロックが与えられたときは、ワイルドカードにマッチした Pathname...
...で Dir.glob base キーワード引数を使っています。

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

//emlist[][ruby]{
require "pathname"
Pathname
("ruby-2.4.2").glob("R*.md") #...
...=> [#<Pathname:ruby-2.4.2/README.md>, #<Pathname:ruby-2.4.2/README.ja.md>]
//}

@see Dir.glob
@see Pathname.glob...
<< 1 2 3 ... > >>