270件ヒット
[1-100件を表示]
(0.145秒)
種類
- インスタンスメソッド (248)
- 特異メソッド (22)
ライブラリ
- pathname (270)
キーワード
- basename (11)
- binread (11)
- binwrite (11)
- birthtime (10)
- directory? (11)
- exist? (11)
- file? (11)
- glob (29)
- mountpoint? (11)
- open (11)
- pipe? (11)
- realdirpath (11)
- realpath (11)
- relative? (11)
-
relative
_ path _ from (11) - setgid? (11)
- setuid? (11)
- size? (11)
- sticky? (11)
- symlink? (11)
-
world
_ writable? (11) - writable? (11)
-
writable
_ real? (11)
検索結果
先頭5件
-
Pathname
# binwrite(string , offset=nil) -> Integer (12401.0) -
IO.binwrite(self.to_s, *args)と同じです。
...
IO.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?...