907件ヒット
[1-100件を表示]
(0.049秒)
種類
- インスタンスメソッド (883)
- 特異メソッド (24)
クラス
- Pathname (907)
キーワード
- <=> (12)
- ascend (12)
- atime (12)
- basename (12)
- binread (12)
- binwrite (12)
- birthtime (11)
- children (12)
- chmod (12)
- chown (12)
- cleanpath (12)
- ctime (12)
- delete (12)
- descend (12)
- directory? (12)
- dirname (12)
-
each
_ child (24) -
each
_ entry (12) -
each
_ filename (12) -
each
_ line (24) - entries (12)
- exist? (12)
- extname (12)
- file? (12)
- find (24)
- ftype (12)
- glob (32)
- hash (12)
- join (12)
- lchmod (12)
- lchown (12)
- lstat (12)
-
make
_ link (12) -
make
_ symlink (12) - mkdir (12)
- mkpath (12)
- mountpoint? (12)
- mtime (12)
- open (24)
- opendir (24)
- pipe? (12)
- read (12)
- readlines (12)
- readlink (12)
- realdirpath (12)
- realpath (24)
- relative? (12)
-
relative
_ path _ from (12) - rmdir (12)
- rmtree (12)
- setgid? (12)
- setuid? (12)
- size (12)
- size? (12)
- split (12)
- stat (12)
- sticky? (12)
- symlink? (12)
- sysopen (12)
-
to
_ path (12) -
to
_ s (12) - unlink (12)
- utime (12)
-
world
_ writable? (12) - writable? (12)
-
writable
_ real? (12) - write (12)
検索結果
先頭5件
-
Pathname
# binwrite(string , offset=nil) -> Integer (6302.0) -
IO.binwrite(self.to_s, *args)と同じです。
...
IO.binwrite(self.to_s, *args)と同じです。
@see IO.binwrite... -
Pathname
# utime(atime , mtime) -> Integer (6302.0) -
File.utime(atime, mtime, self.to_s) と同じです。
...File.utime(atime, mtime, self.to_s) と同じです。
@param atime 最終アクセス時刻を Time か、起算時からの経過秒数を数値で指定します。
@param mtime 更新時刻を Time か、起算時からの経過秒数を数値で指定します。
@see File.utime... -
Pathname
# atime -> Time (6202.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
# binread(*args) -> String | nil (6202.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
# ctime -> Time (6202.0) -
File.ctime(self.to_s) を渡したものと同じです。
...ile.ctime(self.to_s) を渡したものと同じです。
//emlist[例][ruby]{
require 'pathname'
IO.write("testfile", "test")
pathname = Pathname("testfile")
pathname.ctime # => 2019-01-14 00:39:51 +0900
sleep 1
pathname.chmod(0755)
pathname.ctime # => 2019-01-14 00:39:52 +0900
//}
@see File.cti... -
Pathname
# each _ filename {|v| . . . } -> nil (6202.0) -
self のパス名要素毎にブロックを実行します。
...self のパス名要素毎にブロックを実行します。
//emlist[例][ruby]{
require 'pathname'
Pathname.new("/foo/../bar").each_filename {|v| p v}
# => "foo"
# ".."
# "bar"
//}... -
Pathname
# each _ line(*args) {|line| . . . } -> nil (6202.0) -
IO.foreach(self.to_s, *args, &block) と同じです。
...IO.foreach(self.to_s, *args, &block) と同じです。
//emlist[例][ruby]{
require "pathname"
IO.write("testfile", "line1\nline2,\nline3\n")
Pathname("testfile").each_line
# => #<Enumerator: IO:foreach("testfile")>
//}
//emlist[例 ブロックを指定][ruby]{
require "pathname"
IO.write("tes......tfile", "line1\nline2,\nline3\n")
Pathname("testfile").each_line {|f| p f }
# => "line1\n"
# => "line2,\n"
# => "line3\n"
//}
//emlist[例 limit を指定][ruby]{
require "pathname"
IO.write("testfile", "line1\nline2,\nline3\n")
Pathname("testfile").each_line(4) {|f| p f }
# => "line"
# => "1\n"......# => "line"
# => "2,\n"
# => "line"
# => "3\n"
//}
//emlist[例 sep を指定][ruby]{
require "pathname"
IO.write("testfile", "line1\nline2,\nline3\n")
Pathname("testfile").each_line(",") {|f| p f }
# => "line1\nline2,"
# => "\nline3\n"
//}
@see IO.foreach... -
Pathname
# mtime -> Time (6202.0) -
File.mtime(self.to_s) を渡したものと同じです。
...File.mtime(self.to_s) を渡したものと同じです。
@see File.mtime... -
Pathname
# opendir -> Dir (6202.0) -
Dir.open(self.to_s, &block) と同じです。
...Dir.open(self.to_s, &block) と同じです。
@see Dir.open...