3990件ヒット
[1-100件を表示]
(0.105秒)
クラス
-
ARGF
. class (132) - BasicObject (22)
- Binding (17)
- Class (11)
- Dir (234)
- File (883)
-
File
:: Stat (473) - IO (899)
- LoadError (11)
- Object (22)
-
RubyVM
:: InstructionSequence (99) - String (11)
モジュール
-
File
:: Constants (315) - FileTest (292)
-
GC
:: Profiler (88) - Kernel (321)
- Marshal (22)
- Process (11)
-
RubyVM
:: AbstractSyntaxTree (8)
キーワード
-
$ > (11) -
$ FILENAME (11) -
$ stdin (11) -
$ stdout (11) - <=> (11)
-
ALT
_ SEPARATOR (11) - APPEND (11)
- ARGF (11)
- BINARY (11)
- CREAT (11)
- ConditionVariable (9)
- Constants (11)
- DATA (11)
- DIRECT (11)
- DSYNC (11)
- EMFILE (11)
- ENFILE (11)
- EXCL (11)
-
FNM
_ CASEFOLD (11) -
FNM
_ DOTMATCH (11) -
FNM
_ EXTGLOB (11) -
FNM
_ NOESCAPE (11) -
FNM
_ PATHNAME (11) -
FNM
_ SYSCASE (11) - FileTest (11)
- IO (11)
-
LOCK
_ EX (11) -
LOCK
_ NB (11) -
LOCK
_ SH (11) -
LOCK
_ UN (11) - NOATIME (11)
- NOCTTY (11)
- NOFOLLOW (11)
- NONBLOCK (11)
- NULL (11)
-
PATH
_ SEPARATOR (11) - Profiler (11)
- RDONLY (11)
- RDWR (11)
-
RLIMIT
_ NOFILE (11) - RSYNC (11)
- SEPARATOR (11)
-
SHARE
_ DELETE (9) - SYNC (11)
- Separator (11)
- Stat (11)
- TMPFILE (9)
- TRUNC (11)
- Time (11)
- WRONLY (11)
- [] (11)
-
_ _ dir _ _ (11) -
absolute
_ path (22) -
absolute
_ path? (5) - advise (11)
- atime (33)
-
base
_ label (11) - basename (11)
- birthtime (31)
- blksize (11)
- blockdev? (33)
- blocks (11)
- caller (33)
- chardev? (33)
- chmod (22)
- chown (22)
- chroot (11)
- clear (11)
- clone (11)
- close (11)
-
close
_ on _ exec= (11) - closed? (11)
- compile (11)
-
compile
_ file (11) -
compile
_ option= (11) - count (11)
- ctime (33)
- delete (11)
- dev (11)
-
dev
_ major (11) -
dev
_ minor (11) - directory? (33)
- dirname (11)
- disable (11)
- dump (22)
- dup (11)
- each (66)
-
each
_ byte (22) -
each
_ char (22) -
each
_ child (28) -
each
_ codepoint (22) -
each
_ line (66) - empty? (16)
- enable (11)
- enabled? (11)
- entries (11)
- eof (11)
- eof? (11)
- eval (11)
- executable? (33)
-
executable
_ real? (33) - exist? (33)
- exists? (27)
-
external
_ encoding (11) - extname (11)
- fail (33)
- fcntl (11)
- fdatasync (11)
- file (11)
- file? (33)
- filename (11)
- fileno (32)
- flock (11)
- flush (11)
- fnmatch (11)
- fnmatch? (11)
-
for
_ fd (11) - foreach (44)
- ftype (22)
- getbyte (22)
- getc (22)
- gets (44)
- gid (11)
- glob (22)
- grpowned? (33)
- home (22)
- identical? (22)
- ino (11)
-
inplace
_ mode= (11) -
instance
_ eval (22) -
internal
_ encoding (11) - isatty (11)
- join (11)
- label (11)
- lchmod (11)
- lchown (11)
- lineno (22)
- lineno= (11)
- link (11)
- load (11)
- lstat (22)
- lutime (7)
- mkdir (11)
- mkfifo (9)
- mode (11)
- mtime (33)
- new (55)
- nlink (11)
- of (11)
- open (88)
- owned? (33)
-
parse
_ file (8) - path (55)
- pipe? (33)
- pos (11)
- pos= (11)
- pread (7)
- pwrite (7)
- raise (33)
-
raw
_ data (11) - rdev (11)
-
rdev
_ major (11) -
rdev
_ minor (11) - read (55)
- readable? (33)
-
readable
_ real? (33) - readbyte (22)
- readchar (22)
- readline (44)
- readlines (66)
- readlink (11)
- realdirpath (11)
- realpath (11)
- rename (11)
- reopen (33)
- report (11)
- require (11)
-
require
_ relative (11) -
respond
_ to? (11) - result (11)
- rewind (11)
- seek (11)
-
set
_ encoding (33) -
set
_ encoding _ by _ bom (5) - setgid? (33)
- setuid? (33)
- size (44)
- size? (33)
- socket? (33)
-
source
_ location (6) - spawn (44)
- split (11)
- stat (22)
- sticky? (33)
- superclass (11)
- symlink (11)
- symlink? (33)
- sync (11)
- sysread (11)
- sysseek (11)
- system (24)
- syswrite (11)
- tell (11)
- test (22)
-
to
_ i (22) -
to
_ io (11) -
to
_ path (11) -
total
_ time (11) - truncate (22)
- tty? (11)
- uid (11)
- umask (22)
- ungetbyte (11)
- ungetc (11)
- unlink (11)
- utime (11)
-
world
_ readable? (33) -
world
_ writable? (33) - writable? (33)
-
writable
_ real? (33) - write (11)
- zero? (33)
検索結果
先頭5件
-
File (52026.0)
-
ファイルアクセスのためのクラスです。
...のクラスです。
通常 Kernel.#open または File.open を使って生成します。
IO クラスがインクルードしている File::Constants は File クラスに関係する定数を
格納したモジュールです。
また File::Stat は stat 構造体( stat(2) 参照)を表す... -
File
. file?(path) -> bool (44219.0) -
FileTest.#file? と同じです。
...
FileTest.#file? と同じです。
@param path パスを表す文字列か IO オブジェクトを指定します。... -
File
. utime(atime , mtime , *filename) -> Integer (35460.0) -
ファイルの最終アクセス時刻と更新時刻を変更します。 シンボリックリンクに対しては File.lutime と違って、 シンボリックのリンク先を変更します。
...新時刻を変更します。
@param atime 最終アクセス時刻を Time か、起算時からの経過秒数を数値で指定します。
@param mtime 更新時刻を Time か、起算時からの経過秒数を数値で指定します。
@param filename ファイル名を表す文字列を......raise Errno::EXXX 変更に失敗した場合に発生します。
//emlist[例: Time を指定][ruby]{
atime = Time.new(2018, 1, 2, 3, 4, 5)
mtime = Time.new(2018, 2, 3, 4, 5, 6)
File.utime(atime, mtime, "testfile") # => 1
File.atime("testfile") # => 2018-01-02 03:04:05 +0900
File.......mtime("testfile") # => 2018-02-03 04:05:06 +0900
//}
//emlist[例: 経過秒数で指定][ruby]{
File.utime(1, 2, "testfile") # => 1
File.atime("testfile") # => 1970-01-01 09:00:01 +0900
File.mtime("testfile") # => 1970-01-01 09:00:02 +0900
//}......リックリンクに対しては File.lutime と違って、
シンボリックのリンク先を変更します。
@param atime 最終アクセス時刻を Time か、起算時からの経過秒数を数値で指定します。
@param mtime 更新時刻を Time か、起算時からの経過......m filename ファイル名を表す文字列を指定します。複数指定できます。
@return 変更したファイルの数を返します。
@raise Errno::EXXX 変更に失敗した場合に発生します。
//emlist[例: Time を指定][ruby]{
atime = Time.new(2018, 1, 2, 3, 4, 5)
mtim......ime.new(2018, 2, 3, 4, 5, 6)
File.utime(atime, mtime, "testfile") # => 1
File.atime("testfile") # => 2018-01-02 03:04:05 +0900
File.mtime("testfile") # => 2018-02-03 04:05:06 +0900
//}
//emlist[例: 経過秒数で指定][ruby]{
File.utime(1, 2, "testfile") # => 1
Fi... -
File
. lutime(atime , mtime , *filename) -> Integer (35424.0) -
ファイルの最終アクセス時刻と更新時刻を変更します。 シンボリックリンクに対しては File.utime と違って、 シンボリックそのものを変更します。
...ボリックリンクに対しては File.utime と違って、
シンボリックそのものを変更します。
@param atime 最終アクセス時刻を Time か、起算時からの経過秒数を数値で指定します。
@param mtime 更新時刻を Time か、起算時からの経過秒......数を数値で指定します。
@param filename ファイル名を表す文字列を指定します。複数指定できます。
@return 変更したファイルの数を返します。
@raise Errno::EXXX 変更に失敗した場合に発生します。
@see File.utime... -
File
. unlink(*filename) -> Integer (35332.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
. ctime(filename) -> Time (35320.0) -
状態が最後に変更された時刻を返します。 状態の変更とは chmod などによるものです。
...aram filename ファイル名を表す文字列か IO オブジェクトを指定します。
@raise Errno::EXXX ファイルの時刻の取得に失敗した場合に発生します。
//emlist[例:][ruby]{
IO.write("testfile", "test")
File.ctime("testfile") # => 2017-11-30 22:40:49 +0900
File.ch......mod(0755, "testfile")
File.ctime("testfile") # => 2017-11-30 22:42:12 +0900
//}... -
File
. atime(filename) -> Time (35314.0) -
最終アクセス時刻を返します。
...セス時刻を返します。
@param filename ファイル名を表す文字列か IO オブジェクトを指定します。
@raise Errno::EXXX ファイルの時刻の取得に失敗した場合に発生します。
//emlist[例][ruby]{
File.atime(__FILE__) # => 2017-11-28 22:38:44 +0900
//}... -
File
. mtime(filename) -> Time (35314.0) -
最終更新時刻を返します。
...更新時刻を返します。
@param filename ファイル名を表す文字列か IO オブジェクトを指定します。
@raise Errno::EXXX ファイルの時刻の取得に失敗した場合に発生します。
//emlist[例][ruby]{
File.mtime(__FILE__) # => 2017-12-03 03:16:22 +0900
//}... -
File
. identical?(filename1 , filename2) -> bool (35302.0) -
FileTest.#identical? と同じです。
...
FileTest.#identical? と同じです。
@param filename1 パスを表す文字列か IO オブジェクトを指定します。
@param filename2 パスを表す文字列か IO オブジェクトを指定します。... -
File
. join(*item) -> String (35278.0) -
File::SEPARATORを間に入れて文字列を連結します。platform/DOSISH-supportで環境依存になる予定です。
...
File::SEPARATORを間に入れて文字列を連結します。platform/DOSISH-supportで環境依存になる予定です。
@param item 連結したいディレクトリ名やファイル名を文字列(もしくは文字列を要素に持つ配列)で与えます。
文字列A......とBを連結する際に、Aの末尾の文字とBの先頭の文字がFile::SEPARATORであった場合には、
まずこれらを削除した上で改めてFile::SEPARATORを間に入れて連結します。
引数の中に配列がある場合は配列要素を再帰的......数がない場合には空文字列を生成して返します。
@raise TypeError 引数の中に文字列以外の(暗黙の型変換が行えない)オブジェクトが存在した場合に発生します。
@raise ArgumentError 引数の中に、配列要素が自身を含むよう...