831件ヒット
[1-100件を表示]
(0.141秒)
種類
- インスタンスメソッド (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
# realdirpath(basedir = nil) -> Pathname (15502.0) -
Pathname#realpath とほぼ同じで、最後のコンポーネントは実際に 存在しなくてもエラーになりません。
...
Pathname#realpath とほぼ同じで、最後のコンポーネントは実際に
存在しなくてもエラーになりません。
@param basedir ベースディレクトリを指定します。省略するとカレントディレクトリになります。
//emlist[例][ruby]{
require "pathna......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
//......}
@see Pathname#realpath... -
Pathname
# birthtime -> Time (15302.0) -
File.birthtime(self.to_s) を渡したものと同じです。
...File.birthtime(self.to_s) を渡したものと同じです。
@raise NotImplementedError Windows のような birthtime のない環境で発生します。
@see File.birthtime... -
Pathname
# relative _ path _ from(base _ directory) -> Pathname (15302.0) -
base_directory から self への相対パスを求め、その内容の新しい Pathname オブジェクトを生成して返します。
...ase_directory から self への相対パスを求め、その内容の新しい Pathname
オブジェクトを生成して返します。
パス名の解決は文字列操作によって行われ、ファイルシステムをアクセス
しません。
self が相対パスなら base_directory......が絶対パスなら
base_directory も絶対パスでなければなりません。
@param base_directory ベースディレクトリを表す Pathname オブジェクトを指定します。
@raise ArgumentError Windows上でドライブが違うなど、base_directory から self への相対......パスが求められないときに例外が発生します。
//emlist[例][ruby]{
require 'pathname'
path = Pathname.new("/tmp/foo")
base = Pathname.new("/tmp")
path.relative_path_from(base) # => #<Pathname:foo>
//}... -
Pathname
# utime(atime , mtime) -> Integer (12702.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
# binwrite(string , offset=nil) -> Integer (12602.0) -
IO.binwrite(self.to_s, *args)と同じです。
...
IO.binwrite(self.to_s, *args)と同じです。
@see IO.binwrite... -
Pathname
# ctime -> Time (12526.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
# atime -> Time (12514.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
# mtime -> Time (12502.0) -
File.mtime(self.to_s) を渡したものと同じです。
...File.mtime(self.to_s) を渡したものと同じです。
@see File.mtime... -
Pathname
# write(string , offset=nil , **opts) -> Integer (12402.0) -
...
IO.write(self.to_s, string, offset, **opts)と同じです。
@see IO.write... -
Pathname
# directory? -> bool (12302.0) -
FileTest.directory?(self.to_s) と同じです。
...FileTest.directory?(self.to_s) と同じです。
@see FileTest.#directory?...