831件ヒット
[1-100件を表示]
(0.049秒)
種類
- インスタンスメソッド (809)
- 特異メソッド (22)
クラス
- Pathname (831)
キーワード
- <=> (11)
- ascend (11)
- atime (11)
- basename (11)
- binread (11)
- binwrite (11)
- birthtime (10)
- children (11)
- chmod (11)
- chown (11)
- cleanpath (11)
- ctime (11)
- delete (11)
- descend (11)
- directory? (11)
- dirname (11)
-
each
_ child (22) -
each
_ entry (11) -
each
_ filename (11) -
each
_ line (22) - entries (11)
- exist? (11)
- extname (11)
- file? (11)
- find (22)
- ftype (11)
- glob (29)
- hash (11)
- join (11)
- lchmod (11)
- lchown (11)
- lstat (11)
-
make
_ link (11) -
make
_ symlink (11) - mkdir (11)
- mkpath (11)
- mountpoint? (11)
- mtime (11)
- open (22)
- opendir (22)
- pipe? (11)
- read (11)
- readlines (11)
- readlink (11)
- realdirpath (11)
- realpath (22)
- relative? (11)
-
relative
_ path _ from (11) - rmdir (11)
- rmtree (11)
- setgid? (11)
- setuid? (11)
- size (11)
- size? (11)
- split (11)
- stat (11)
- sticky? (11)
- symlink? (11)
- sysopen (11)
-
to
_ path (11) -
to
_ s (11) - unlink (11)
- utime (11)
-
world
_ writable? (11) - writable? (11)
-
writable
_ real? (11) - write (11)
検索結果
先頭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... -
Pathname
# opendir {|dir| . . . } -> nil (6202.0) -
Dir.open(self.to_s, &block) と同じです。
...Dir.open(self.to_s, &block) と同じです。
@see Dir.open...