種類
- インスタンスメソッド (1238)
- 特異メソッド (60)
- 定数 (24)
ライブラリ
- pathname (1322)
キーワード
- + (12)
-
/ (11) - <=> (12)
- == (12)
- === (12)
-
SEPARATOR
_ PAT (12) -
TO
_ PATH (12) - absolute? (12)
- ascend (24)
- atime (12)
- basename (12)
- binread (12)
- binwrite (12)
- birthtime (11)
- blockdev? (12)
- chardev? (12)
- children (12)
- chmod (12)
- chown (12)
- cleanpath (12)
- ctime (12)
- delete (12)
- descend (24)
- directory? (12)
- dirname (12)
-
each
_ child (24) -
each
_ entry (15) -
each
_ filename (12) -
each
_ line (24) - empty? (9)
- entries (12)
- eql? (12)
- executable? (12)
-
executable
_ real? (12) - exist? (12)
- extname (12)
- file? (12)
- find (24)
- fnmatch (12)
- fnmatch? (12)
- ftype (12)
- getwd (12)
- glob (40)
- grpowned? (12)
- hash (12)
- join (12)
- lchmod (12)
- lchown (12)
- lstat (12)
-
make
_ link (12) -
make
_ symlink (12) - mkdir (12)
- mkpath (12)
- mountpoint? (12)
- mtime (12)
- new (12)
- open (24)
- opendir (24)
- owned? (12)
- parent (12)
- pipe? (12)
- pwd (12)
- read (12)
- readable? (12)
-
readable
_ real? (12) - readlines (12)
- readlink (12)
- realdirpath (12)
- realpath (24)
- relative? (12)
-
relative
_ path _ from (12) - rename (12)
- rmdir (12)
- rmtree (12)
- root? (12)
- setgid? (12)
- setuid? (12)
- size (12)
- size? (12)
- socket? (12)
- split (12)
- stat (12)
- sticky? (12)
- sub (24)
-
sub
_ ext (12) - symlink? (12)
- sysopen (12)
-
to
_ path (12) -
to
_ s (12) - truncate (12)
- unlink (12)
- utime (12)
-
world
_ readable? (12) -
world
_ writable? (12) - writable? (12)
-
writable
_ real? (12) - write (12)
- zero? (12)
検索結果
先頭5件
-
Pathname
# atime -> Time (1.0) -
File.atime(self.to_s) を渡したものと同じです。
...File.atime(self.to_s) を渡したものと同じです。
//emlist[例][ruby]{
require "pathname"
pathname = Pathname("testfile")
pathname.atime # => 2018-12-18 20:58:13 +0900
//}
@see File.atime... -
Pathname
# basename(suffix = "") -> Pathname (1.0) -
Pathname.new(File.basename(self.to_s, suffix)) と同じです。
...Pathname.new(File.basename(self.to_s, suffix)) と同じです。
@param suffix サフィックスを文字列で与えます。'.*' という文字列を与えた場合、'*' はワイルドカードとして働き
'.' を含まない任意の文字列にマッチします。
//emli......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("ruby/y.......tab.c").basename(".*") #=> #<Pathname:"y.tab">
//}
@see File.basename... -
Pathname
# binread(*args) -> String | nil (1.0) -
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(20, 10) # => "ne one\nThis is lin... -
Pathname
# binwrite(string , offset=nil) -> Integer (1.0) -
IO.binwrite(self.to_s, *args)と同じです。
IO.binwrite(self.to_s, *args)と同じです。
@see IO.binwrite -
Pathname
# birthtime -> Time (1.0) -
File.birthtime(self.to_s) を渡したものと同じです。
File.birthtime(self.to_s) を渡したものと同じです。
@raise NotImplementedError Windows のような birthtime のない環境で発生します。
@see File.birthtime -
Pathname
# blockdev? -> bool (1.0) -
FileTest.blockdev?(self.to_s) と同じです。
FileTest.blockdev?(self.to_s) と同じです。
@see FileTest.#blockdev? -
Pathname
# chardev? -> bool (1.0) -
FileTest.chardev?(self.to_s) と同じです。
FileTest.chardev?(self.to_s) と同じです。
@see FileTest.#chardev? -
Pathname
# children(with _ directory = true) -> [Pathname] (1.0) -
self 配下にあるパス名(Pathnameオブジェクト)の配列を返します。
...self 配下にあるパス名(Pathnameオブジェクト)の配列を返します。
ただし、 ".", ".." は要素に含まれません。
@param with_directory 偽を指定するとファイル名のみ返します。デフォルトは真です。
@raise Errno::EXXX self が存在しないパ......スであったりディレクトリでなければ例外が発生します。
//emlist[例][ruby]{
require 'pathname'
Pathname.new("/tmp").children # => [#<Pathname:.X11-unix>, #<Pathname:.iroha_unix>, ... ]
//}... -
Pathname
# chmod(mode) -> Integer (1.0) -
File.chmod(mode, self.to_s) と同じです。
File.chmod(mode, self.to_s) と同じです。
@param mode ファイルのアクセス権限を整数で指定します。
@see File.chmod