576件ヒット
[1-100件を表示]
(0.068秒)
別のキーワード
種類
- インスタンスメソッド (540)
- 特異メソッド (24)
- 定数 (12)
ライブラリ
- pathname (576)
キーワード
- == (12)
- === (12)
-
TO
_ PATH (12) - absolute? (12)
- basename (12)
- binread (12)
- binwrite (12)
- birthtime (11)
- blockdev? (12)
- chardev? (12)
- directory? (12)
- empty? (9)
- eql? (12)
- executable? (12)
-
executable
_ real? (12) - exist? (12)
- file? (12)
- fnmatch (12)
- fnmatch? (12)
- glob (40)
- grpowned? (12)
- mountpoint? (12)
- open (12)
- owned? (12)
- pipe? (12)
- readable? (12)
-
readable
_ real? (12) - realdirpath (12)
- realpath (12)
- relative? (12)
-
relative
_ path _ from (12) - root? (12)
- setgid? (12)
- setuid? (12)
- size? (12)
- socket? (12)
- sticky? (12)
- sub (24)
-
sub
_ ext (12) - symlink? (12)
-
world
_ readable? (12) -
world
_ writable? (12) - writable? (12)
-
writable
_ real? (12) - zero? (12)
検索結果
先頭5件
-
Pathname
# absolute? -> bool (6101.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 (6101.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 (6101.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 (6101.0) -
IO.binwrite(self.to_s, *args)と同じです。
...IO.binwrite(self.to_s, *args)と同じです。
@see IO.binwrite... -
Pathname
# birthtime -> Time (6101.0) -
File.birthtime(self.to_s) を渡したものと同じです。
...File.birthtime(self.to_s) を渡したものと同じです。
@raise NotImplementedError Windows のような birthtime のない環境で発生します。
@see File.birthtime... -
Pathname
# blockdev? -> bool (6101.0) -
FileTest.blockdev?(self.to_s) と同じです。
...FileTest.blockdev?(self.to_s) と同じです。
@see FileTest.#blockdev?... -
Pathname
# executable? -> bool (6101.0) -
FileTest.executable?(self.to_s) と同じです。
...FileTest.executable?(self.to_s) と同じです。
@see FileTest.#executable?... -
Pathname
# executable _ real? -> bool (6101.0) -
FileTest.executable_real?(self.to_s) と同じです。
...FileTest.executable_real?(self.to_s) と同じです。
@see FileTest.#executable_real?... -
Pathname
# glob(pattern , flags=0) -> [Pathname] (6101.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...