ライブラリ
- ビルトイン (1357)
- csv (33)
- erb (33)
- fiddle (11)
-
irb
/ cmd / load (33) - logger (11)
- mkmf (22)
-
net
/ http (88) - optparse (11)
- pathname (187)
- rake (275)
-
rake
/ loaders / makefile (11) -
rake
/ packagetask (22) - ripper (11)
-
ripper
/ filter (11) -
rubygems
/ installer (11) - un (44)
-
webrick
/ httprequest (11) - win32ole (11)
- zlib (22)
クラス
-
ARGF
. class (88) - BasicObject (22)
- Binding (17)
- CSV (33)
- Class (11)
- Dir (21)
- ERB (33)
-
Fiddle
:: Function (11) - File (121)
-
File
:: Stat (462) -
Gem
:: Installer (11) - IO (503)
-
IRB
:: ExtendCommand :: Load (11) -
IRB
:: ExtendCommand :: Require (11) -
IRB
:: ExtendCommand :: Source (11) - Logger (11)
- Method (23)
-
Net
:: HTTP (44) -
Net
:: HTTPGenericRequest (22) -
Net
:: HTTPResponse (22) - Object (11)
- OptionParser (11)
- Pathname (187)
- Proc (12)
-
Rake
:: Application (11) -
Rake
:: DefaultLoader (11) -
Rake
:: FileList (187) -
Rake
:: FileTask (22) -
Rake
:: MakefileLoader (11) -
Rake
:: PackageTask (22) - Ripper (11)
-
Ripper
:: Filter (11) -
RubyVM
:: InstructionSequence (44) - String (11)
-
WEBrick
:: HTTPRequest (11) -
WIN32OLE
_ TYPE (11) -
Zlib
:: GzipWriter (22)
モジュール
- Enumerable (11)
- FileUtils (11)
- Kernel (66)
-
Rake
:: Cloneable (22) -
Rake
:: TaskManager (11)
キーワード
- << (23)
- <=> (11)
- == (11)
- >> (12)
-
absolute
_ path (11) -
add
_ row (11) - advise (11)
- ascend (22)
- atime (33)
-
base
_ label (11) - basename (11)
- birthtime (11)
- blksize (11)
- blockdev? (11)
- blocks (11)
-
body
_ stream (11) -
body
_ stream= (11) - call (11)
- chardev? (11)
- chmod (22)
- chown (22)
- chunk (11)
- cleanpath (11)
-
clear
_ exclude (11) - clone (22)
- close (22)
- closed? (11)
- count (11)
-
create
_ makefile (11) - ctime (33)
-
def
_ class (11) - descend (22)
- dev (11)
-
dev
_ major (11) -
dev
_ minor (11) - directory? (11)
- dirname (11)
- dup (22)
- each (66)
-
each
_ byte (22) -
each
_ codepoint (22) -
each
_ filename (11) -
each
_ line (66) - egrep (11)
- eval (11)
-
excluded
_ from _ list? (11) - executable? (11)
-
executable
_ real? (11) - execute (33)
- existing (11)
- existing! (11)
- ext (11)
-
external
_ encoding (11) - fcntl (11)
- fdatasync (11)
- file (11)
- file? (11)
- filename (44)
- filename= (11)
- fileno (21)
- finish (11)
- flock (11)
- flush (11)
- fnmatch (11)
-
formatted
_ program _ filename (11) - formatter (11)
- ftype (11)
- get (22)
- getbyte (11)
- getc (11)
- gid (11)
- grpowned? (11)
- gsub! (11)
- helpfile (11)
- import (11)
- ino (11)
-
inplace
_ mode= (11) -
install
_ rb (11) -
instance
_ eval (22) -
internal
_ encoding (11) -
is
_ a? (11) - isatty (11)
-
kind
_ of? (11) - label (11)
- load (33)
- lstat (11)
- mode (11)
- mtime (22)
- needed? (11)
- nlink (11)
- owned? (11)
-
package
_ files (11) -
package
_ files= (11) - parameters (11)
- path (33)
- pathmap (11)
- pipe? (11)
- pos (11)
- pos= (11)
- post (22)
- pread (7)
- puts (11)
- pwrite (7)
- query (11)
- rakefile (11)
- rdev (11)
-
rdev
_ major (11) -
rdev
_ minor (11) - read (11)
-
read
_ body (22) - readable? (11)
-
readable
_ real? (11) - readbyte (22)
- readchar (11)
- readlines (33)
- realpath (22)
- reopen (33)
- resolve (11)
-
respond
_ to? (11) - rm (11)
-
set
_ encoding _ by _ bom (5) - setgid? (11)
- setuid? (11)
- size (22)
- size? (11)
- socket? (11)
-
source
_ location (6) - split (11)
- stat (11)
- sticky? (11)
- sub! (11)
- superclass (11)
- symlink? (11)
- sync (11)
-
synthesize
_ file _ task (11) - syswrite (11)
- tell (11)
-
to
_ a (11) -
to
_ ary (11) -
to
_ i (11) -
to
_ path (11) -
to
_ s (22) - touch (11)
- truncate (11)
- tty? (11)
- uid (11)
-
wait
_ writable (11) -
world
_ readable? (11) -
world
_ writable? (11) - writable? (11)
-
writable
_ real? (11) - write (11)
- zero? (11)
検索結果
先頭5件
-
File
# lstat -> File :: Stat (21154.0) -
ファイルの状態を含む File::Stat オブジェクトを生成して返します。 シンボリックリンクに関してリンクそのものの情報を返します。 lstat(2) を実装していないシステムでは、IO#statと同じです。
...ファイルの状態を含む File::Stat オブジェクトを生成して返します。
シンボリックリンクに関してリンクそのものの情報を返します。
lstat(2) を実装していないシステムでは、IO#statと同じです。
@raise Errno::EXXX 失敗した場合......ose されている場合に発生します。
//emlist[例][ruby]{
# testlink は testfile のシンボリックリンク
File.open("testlink") do |f|
p f.lstat == File.stat("testfile") # => false
p f.stat == File.stat("testfile") # => true
end
//}
@see IO#stat, File.stat, File.lstat... -
File
# flock(operation) -> 0 | false (21139.0) -
ファイルをロックします。
...をロックします。
ロックを取得するまでブロックされます。
ロックの取得に成功した場合は 0 を返します。
File::LOCK_NB (ノンブロッキング) を指定すると、本来ならブロックされる場合に
ブロックされずに false を返すよう......eration に有効な定数は以下の通りです。定数は File::Constants で定義されていますが、
File クラスの親クラスの IO が File::Constants をインクルードしているので、
これらの定数は File::LOCK_SH などとして参照可能です。
: LOCK_SH
共......的なアンロック以外に、ファイルのcloseやRubyインタプリタの終了
(プロセスの終了)によっても自動的にロック状態は解除されます。
: LOCK_NB
ノンブロックモード。
File::LOCK_SH | File::LOCK_NB のように他の指定と or することで... -
FileUtils
# ruby(*args) {|result , status| . . . } (21130.0) -
与えられた引数で Ruby インタプリタを実行します。
...与えられた引数で Ruby インタプリタを実行します。
@param args Ruby インタプリタに与える引数を指定します。
例:
ruby %{-pe '$_.upcase!' <README}
@see Kernel.#sh... -
File
# path -> String (21049.0) -
オープン時に使用したパスを文字列で返します。
...Error TMPFILE File::Constants::TMPFILEオプション付きで作成されている場合に発生します。
//emlist[例][ruby]{
File.open("testfile") {|f| f.path } #=> "testfile"
File.open("/tmp/../tmp/xxx", "w") {|f| f.path } #=> "/tmp/../tmp/xxx"
File.open("/......tmp", File::RDWR | File::TMPFILE){|f| f.path } # IOError: File is unnamed (TMPFILE?)
//}... -
File
# to _ path -> String (21049.0) -
オープン時に使用したパスを文字列で返します。
...Error TMPFILE File::Constants::TMPFILEオプション付きで作成されている場合に発生します。
//emlist[例][ruby]{
File.open("testfile") {|f| f.path } #=> "testfile"
File.open("/tmp/../tmp/xxx", "w") {|f| f.path } #=> "/tmp/../tmp/xxx"
File.open("/......tmp", File::RDWR | File::TMPFILE){|f| f.path } # IOError: File is unnamed (TMPFILE?)
//}... -
File
# path -> String (21043.0) -
オープン時に使用したパスを文字列で返します。
...、
File::Constants::TMPFILEオプション付きで作成されていたりする場合です。
//emlist[例][ruby]{
File.open("testfile") {|f| f.path } #=> "testfile"
File.open("/tmp/../tmp/xxx", "w") {|f| f.path } #=> "/tmp/../tmp/xxx"
File.open("/tmp", File::R......DWR | File::TMPFILE){|f| f.path } #=> "/tmp"
//}... -
File
# to _ path -> String (21043.0) -
オープン時に使用したパスを文字列で返します。
...、
File::Constants::TMPFILEオプション付きで作成されていたりする場合です。
//emlist[例][ruby]{
File.open("testfile") {|f| f.path } #=> "testfile"
File.open("/tmp/../tmp/xxx", "w") {|f| f.path } #=> "/tmp/../tmp/xxx"
File.open("/tmp", File::R......DWR | File::TMPFILE){|f| f.path } #=> "/tmp"
//}... -
File
# atime -> Time (21037.0) -
最終アクセス時刻を Time オブジェクトとして返します。
...に発生します。
@raise Errno::EXXX ファイルの時刻の取得に失敗した場合に発生します。
//emlist[例:][ruby]{
IO.write("testfile", "test")
File.open("testfile") { |f| f.atime } # => 2017-12-21 22:58:17 +0900
//}
@see File#lstat, File#ctime, File#mtime, File#birthtime... -
File
# ctime -> Time (21037.0) -
状態が最後に変更された時刻を Time オブジェクトとして返します。状態の変更とは chmod などによるものです。
...に発生します。
@raise Errno::EXXX ファイルの時刻の取得に失敗した場合に発生します。
//emlist[例:][ruby]{
IO.write("testfile", "test")
File.open("testfile") { |f| f.ctime } # => 2017-12-21 22:58:17 +0900
//}
@see File#lstat, File#atime, File#mtime, File#birthtime... -
File
# mtime -> Time (21037.0) -
最終更新時刻を Time オブジェクトとして返します。
...に発生します。
@raise Errno::EXXX ファイルの時刻の取得に失敗した場合に発生します。
//emlist[例:][ruby]{
IO.write("testfile", "test")
File.open("testfile") { |f| f.mtime } # => 2017-12-21 22:58:17 +0900
//}
@see File#lstat, File#atime, File#ctime, File#birthtime... -
File
# atime -> Time (21031.0) -
最終アクセス時刻を Time オブジェクトとして返します。
...れている場合に発生します。
@raise Errno::EXXX ファイルの時刻の取得に失敗した場合に発生します。
//emlist[例:][ruby]{
IO.write("testfile", "test")
File.open("testfile") { |f| f.atime } # => 2017-12-21 22:58:17 +0900
//}
@see File#lstat, File#ctime, File#mtime... -
File
# chown(owner , group) -> 0 (21031.0) -
ファイルのオーナーとグループを変更します。
...ます。
@raise Errno::EXXX 変更に失敗した場合に発生します。
//emlist[例][ruby]{
File.open("testfile") { |f| f.chown(502, 1000) } # => 0
File.stat("testfile").uid # => 502
File.stat("testfile").gid # => 1000
//}
@see File.chown... -
File
# ctime -> Time (21031.0) -
状態が最後に変更された時刻を Time オブジェクトとして返します。状態の変更とは chmod などによるものです。
...れている場合に発生します。
@raise Errno::EXXX ファイルの時刻の取得に失敗した場合に発生します。
//emlist[例:][ruby]{
IO.write("testfile", "test")
File.open("testfile") { |f| f.ctime } # => 2017-12-21 22:58:17 +0900
//}
@see File#lstat, File#atime, File#mtime... -
File
# mtime -> Time (21031.0) -
最終更新時刻を Time オブジェクトとして返します。
...ている場合に発生します。
@raise Errno::EXXX ファイルの時刻の取得に失敗した場合に発生します。
//emlist[例:][ruby]{
IO.write("testfile", "test")
File.open("testfile") { |f| f.mtime } # => 2017-12-21 22:58:17 +0900
//}
@see File#lstat, File#atime, File#ctime... -
File
# size -> Integer (21019.0) -
ファイルのサイズを返します。
...ファイルのサイズを返します。
//emlist[例][ruby]{
File.open("/dev/null") do |f|
f.size #=> 0
end
//}
@raise IOError 自身が close されている場合に発生します。
@raise Errno::EXXX 失敗した場合に発生します。
@see File#lstat...