1229件ヒット
[1-100件を表示]
(0.092秒)
ライブラリ
- ビルトイン (597)
- csv (36)
-
net
/ ftp (20) -
net
/ http (96) -
net
/ pop (24) - openssl (84)
- pathname (48)
- rake (12)
-
rake
/ loaders / makefile (12) -
rubygems
/ indexer (12) -
rubygems
/ remote _ fetcher (12) - shell (12)
-
shell
/ command-processor (12) -
shell
/ filter (24) - tempfile (36)
- zlib (192)
クラス
- CSV (36)
- Dir (23)
- File (120)
-
File
:: Stat (12) -
Gem
:: Indexer (12) -
Gem
:: RemoteFetcher (12) - IO (430)
-
Net
:: FTP (20) -
Net
:: HTTP (48) -
Net
:: HTTPGenericRequest (24) -
Net
:: HTTPResponse (24) -
Net
:: POP3 (24) -
OpenSSL
:: Config (12) -
OpenSSL
:: SSL :: SSLContext (48) -
OpenSSL
:: X509 :: ExtensionFactory (12) -
OpenSSL
:: X509 :: Store (12) - Pathname (48)
-
Rake
:: MakefileLoader (12) - Shell (12)
-
Shell
:: CommandProcessor (12) -
Shell
:: Filter (24) - Tempfile (36)
-
Zlib
:: GzipReader (24) -
Zlib
:: GzipWriter (168)
モジュール
- Enumerable (12)
- Kernel (12)
キーワード
- << (24)
- <=> (12)
- > (6)
- >> (6)
-
add
_ file (12) -
add
_ row (12) - advise (12)
- atime (12)
-
body
_ stream (12) -
body
_ stream= (12) -
ca
_ file (12) -
ca
_ file= (12) -
cert
_ store= (12) - chown (12)
- chunk (12)
- clone (12)
- close (36)
- close! (12)
-
close
_ on _ exec= (12) - comment= (12)
- config= (12)
- ctime (12)
-
delete
_ all (24) - dup (12)
- each (12)
-
each
_ byte (24) -
each
_ codepoint (24) -
external
_ encoding (12) - fcntl (12)
- fdatasync (12)
- file (12)
- fileno (11)
- finish (12)
- flock (12)
- flush (24)
- get (24)
- gzip (12)
-
internal
_ encoding (12) - load (12)
- lstat (12)
- mlsd (20)
- mtime (12)
- mtime= (12)
-
open
_ uri _ or _ path (12) -
orig
_ name= (12) - out (18)
- path (12)
- pos (24)
- pos= (12)
- post (24)
- pread (8)
- print (12)
- printf (12)
- putc (12)
- puts (24)
- pwrite (8)
- read (24)
-
read
_ body (24) - readbyte (12)
- readchar (12)
- readline (12)
- readlines (36)
- reopen (36)
-
set
_ encoding (36) -
set
_ encoding _ by _ bom (6) -
set
_ params (12) - size (12)
- stat (12)
- sync (12)
- sysread (12)
- sysseek (12)
- syswrite (12)
- tell (24)
-
to
_ path (24) -
to
_ s (12) - truncate (12)
- write (24)
検索結果
先頭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 (21145.0) -
ファイルをロックします。
...をロックします。
ロックを取得するまでブロックされます。
ロックの取得に成功した場合は 0 を返します。
File::LOCK_NB (ノンブロッキング) を指定すると、本来ならブロックされる場合に
ブロックされずに false を返すよう......eration に有効な定数は以下の通りです。定数は File::Constants で定義されていますが、
File クラスの親クラスの IO が File::Constants をインクルードしているので、
これらの定数は File::LOCK_SH などとして参照可能です。
: LOCK_SH
共......ブロックモード。
File::LOCK_SH | File::LOCK_NB のように他の指定と or することで指
定します。この指定がない場合、ブロックされる条件での flock
の呼び出しはロックが解除されるまでブロックされます。
File::LOCK_NB の指定が... -
Tempfile
# open -> self (21108.0) -
クローズしたテンポラリファイルを再オープンします。 "r+" でオープンされるので、クローズ前の内容を再度読む ことができます。
...ァイルを再オープンします。
"r+" でオープンされるので、クローズ前の内容を再度読む
ことができます。
require "tempfile"
tf = Tempfile.new("foo")
tf.print("foobar,hoge\n")
tf.print("bar,ugo\n")
tf.close
tf.open
p tf.gets # => "foobar,hoge\n"... -
File
# path -> String (21061.0) -
オープン時に使用したパスを文字列で返します。
...or 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 (21061.0) -
オープン時に使用したパスを文字列で返します。
...or 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 (21055.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 (21055.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...