883件ヒット
[1-100件を表示]
(0.165秒)
種類
- 特異メソッド (708)
- インスタンスメソッド (131)
- 定数 (44)
ライブラリ
- ビルトイン (883)
キーワード
-
ALT
_ SEPARATOR (11) -
PATH
_ SEPARATOR (11) - SEPARATOR (11)
- Separator (11)
-
absolute
_ path (11) -
absolute
_ path? (5) - atime (22)
- basename (11)
- birthtime (20)
- blockdev? (11)
- chardev? (11)
- chmod (22)
- chown (22)
- ctime (22)
- delete (11)
- directory? (11)
- dirname (11)
- empty? (8)
- executable? (11)
-
executable
_ real? (11) - exist? (11)
- exists? (9)
- extname (11)
- file? (11)
- flock (11)
- fnmatch (11)
- fnmatch? (11)
- ftype (11)
- grpowned? (11)
- identical? (11)
- join (11)
- lchmod (11)
- lchown (11)
- link (11)
- lstat (22)
- lutime (7)
- mkfifo (9)
- mtime (22)
- new (11)
- open (22)
- owned? (11)
- path (22)
- pipe? (11)
- readable? (11)
-
readable
_ real? (11) - readlink (11)
- realdirpath (11)
- realpath (11)
- rename (11)
- setgid? (11)
- setuid? (11)
- size (22)
- size? (11)
- socket? (11)
- split (11)
- stat (11)
- sticky? (11)
- symlink (11)
- symlink? (11)
-
to
_ path (11) - truncate (22)
- umask (22)
- unlink (11)
- utime (11)
-
world
_ readable? (11) -
world
_ writable? (11) - writable? (11)
-
writable
_ real? (11) - zero? (11)
検索結果
先頭5件
-
File
. file?(path) -> bool (18201.0) -
FileTest.#file? と同じです。
...
FileTest.#file? と同じです。
@param path パスを表す文字列か IO オブジェクトを指定します。... -
File
. unlink(*filename) -> Integer (15301.0) -
ファイルを削除します。削除したファイルの数を返します。 削除に失敗した場合は例外 Errno::EXXX が発生します。
...Dir.rmdir を使います。
@param filename ファイル名を表す文字列を指定します。
@raise Errno::EXXX 失敗した場合に発生します。
//emlist[例][ruby]{
IO.write("test.txt", "test")
p File.exist?("test.txt") # => true
p File.delete("test.txt") # => 1
p File.exist?("......test.txt") # => false
begin
File.delete("test.txt")
rescue
p $! # => #<Errno::ENOENT: No such file or directory @ unlink_internal - test.txt>
end
//}... -
File
. world _ writable?(path) -> bool (15201.0) -
path が全てのユーザから書き込めるならば、そのファイルのパーミッションを表す 整数を返します。そうでない場合は nil を返します。
...返します。そうでない場合は nil を返します。
整数の意味はプラットフォームに依存します。
@param path パスを表す文字列か IO オブジェクトを指定します。
//emlist[例][ruby]{
m = File.world_writable?("/tmp")
"%o" % m... -
File
. writable?(path) -> bool (15201.0) -
FileTest.#writable? と同じです。
...
FileTest.#writable? と同じです。
@param path パスを表す文字列を指定します。... -
File
. writable _ real?(path) -> bool (15201.0) -
FileTest.#writable_real? と同じです。
...
FileTest.#writable_real? と同じです。
@param path パスを表す文字列を指定します。... -
File
. lutime(atime , mtime , *filename) -> Integer (12401.0) -
ファイルの最終アクセス時刻と更新時刻を変更します。 シンボリックリンクに対しては File.utime と違って、 シンボリックそのものを変更します。
...ボリックリンクに対しては File.utime と違って、
シンボリックそのものを変更します。
@param atime 最終アクセス時刻を Time か、起算時からの経過秒数を数値で指定します。
@param mtime 更新時刻を Time か、起算時からの経過秒......数を数値で指定します。
@param filename ファイル名を表す文字列を指定します。複数指定できます。
@return 変更したファイルの数を返します。
@raise Errno::EXXX 変更に失敗した場合に発生します。
@see File.utime... -
File
. delete(*filename) -> Integer (12301.0) -
ファイルを削除します。削除したファイルの数を返します。 削除に失敗した場合は例外 Errno::EXXX が発生します。
...Dir.rmdir を使います。
@param filename ファイル名を表す文字列を指定します。
@raise Errno::EXXX 失敗した場合に発生します。
//emlist[例][ruby]{
IO.write("test.txt", "test")
p File.exist?("test.txt") # => true
p File.delete("test.txt") # => 1
p File.exist?("......test.txt") # => false
begin
File.delete("test.txt")
rescue
p $! # => #<Errno::ENOENT: No such file or directory @ unlink_internal - test.txt>
end
//}... -
File
. readlink(path) -> String (12301.0) -
シンボリックリンクのリンク先のパスを文字列で返します。
...す。
@raise Errno::EXXX 指定された path がシンボリックリンクでない場合や、リンクの読み取りに失敗した場合に発生します。
//emlist[例:][ruby]{
IO.write("testfile", "test")
File.symlink("testfile", "testlink") # => 0
File.readlink("testlink")......# => "testfile"
//}... -
File
. realdirpath(pathname , basedir = nil) -> String (12301.0) -
与えられた pathname に対応する絶対パスを返します。
...例外は発生しません。
@param pathname ファイル名を指定します。
@param basedir ベースディレクトリを指定します。省略するとカレントディレクトリを使用します。
@raise Errno::ENOENT ファイルが存在しない場合に発生します。... -
File
. identical?(filename1 , filename2) -> bool (12201.0) -
FileTest.#identical? と同じです。
...
FileTest.#identical? と同じです。
@param filename1 パスを表す文字列か IO オブジェクトを指定します。
@param filename2 パスを表す文字列か IO オブジェクトを指定します。...