ライブラリ
- ビルトイン (1248)
-
cgi
/ session (22) -
cgi
/ session / pstore (11) - coverage (6)
- csv (121)
- digest (11)
- fiddle (22)
- fileutils (55)
-
io
/ console (11) -
irb
/ extend-command (22) -
irb
/ input-method (22) -
irb
/ magic-file (33) - logger (11)
-
net
/ pop (44) - open-uri (29)
- openssl (33)
- pathname (11)
- pstore (11)
- psych (83)
- pty (22)
- rake (77)
-
rdoc
/ generator / json _ index (11) -
rdoc
/ parser (22) -
rdoc
/ parser / c (11) -
rdoc
/ parser / ruby (11) -
rdoc
/ parser / simple (11) -
rdoc
/ top _ level (11) - readline (44)
- resolv (11)
- ripper (22)
-
ripper
/ filter (11) -
ripper
/ lexer (22) -
ripper
/ sexp (22) -
rubygems
/ format (11) -
rubygems
/ old _ format (11) -
rubygems
/ package (11) -
rubygems
/ source _ index (11) -
rubygems
/ source _ info _ cache (44) -
rubygems
/ specification (11) -
shell
/ builtin-command (24) - tempfile (55)
-
test
/ unit (1) - tmpdir (22)
- tracer (55)
-
webrick
/ httpservlet / filehandler (44) -
webrick
/ log (11) - win32ole (11)
-
yaml
/ store (19) - zlib (143)
クラス
-
CGI
:: Session (11) -
CGI
:: Session :: FileStore (11) -
CGI
:: Session :: PStore (11) - CSV (121)
- Coverage (6)
-
Digest
:: Base (11) - Dir (235)
-
Errno
:: EXXX (22) -
Fiddle
:: Pointer (22) - File (708)
-
File
:: Stat (11) -
Gem
:: FileOperations (11) -
Gem
:: Format (11) -
Gem
:: OldFormat (11) -
Gem
:: SourceIndex (11) -
Gem
:: SourceInfoCache (44) -
Gem
:: Specification (11) - IO (121)
-
IRB
:: FileInputMethod (11) -
IRB
:: InputMethod (11) - Logger (11)
-
Net
:: POP3 (44) -
OpenSSL
:: Config (22) -
OpenSSL
:: PKCS7 (11) - PStore (11)
- Pathname (11)
-
RDoc
:: Generator :: JsonIndex (11) -
RDoc
:: Parser (22) -
RDoc
:: Parser :: C (11) -
RDoc
:: Parser :: Ruby (11) -
RDoc
:: Parser :: Simple (11) -
RDoc
:: TopLevel (11) -
Rake
:: FileList (22) -
Rake
:: FileTask (11) -
Resolv
:: Hosts (11) - Ripper (66)
-
Ripper
:: Filter (11) -
RubyVM
:: InstructionSequence (55) -
Shell
:: AppendFile (6) -
Shell
:: AppendIO (6) -
Shell
:: Cat (6) -
Shell
:: Tee (6) - SystemCallError (33)
- Tempfile (55)
- Tracer (55)
-
WEBrick
:: BasicLog (11) -
WEBrick
:: HTTPServlet :: DefaultFileHandler (11) -
WEBrick
:: HTTPServlet :: FileHandler (33) - WIN32OLE (11)
-
YAML
:: Store (19) -
Zlib
:: GzipFile (33) -
Zlib
:: GzipReader (55) -
Zlib
:: GzipWriter (55)
モジュール
- FileUtils (55)
-
GC
:: Profiler (88) -
IRB
:: ContextExtender (11) -
IRB
:: ExtendCommandBundle (11) - OpenURI (22)
- PTY (22)
- Psych (83)
- RakeFileUtils (44)
- Readline (44)
-
RubyVM
:: AbstractSyntaxTree (8) -
Test
:: Unit (1) - URI (7)
オブジェクト
-
IRB
:: MagicFile (33)
キーワード
-
ENCODING
_ SPEC _ RE (11) - [] (33)
-
absolute
_ path (11) -
absolute
_ path? (5) -
add
_ filter (22) -
add
_ handler (11) - atime (11)
- basename (11)
- birthtime (10)
- blockdev? (11)
-
can
_ parse (11) - certs (11)
- chardev? (11)
- chmod (11)
- chown (11)
- chroot (11)
- clear (11)
-
collect
_ method (11) - commands (11)
- compile (11)
-
compile
_ file (11) -
compile
_ option= (11) - console (11)
- create (22)
- ctime (11)
-
def
_ extend _ command (22) - delete (11)
- directory? (11)
- dirname (11)
- disable (11)
-
each
_ child (28) - empty? (8)
- enable (11)
- enabled? (11)
- entries (11)
- executable? (11)
-
executable
_ real? (11) - exist? (22)
- exists? (18)
- extname (11)
- file? (11)
-
filename
_ quote _ characters (11) -
filename
_ quote _ characters= (11) - filter (33)
- fnmatch (11)
- fnmatch? (11)
-
for
_ fd (11) - foreach (66)
-
from
_ file _ by _ path (22) - ftype (11)
- glob (22)
- grpowned? (11)
-
have
_ option? (11) - home (22)
- identical? (11)
- input= (11)
- join (11)
-
latest
_ system _ cache _ file (11) -
latest
_ user _ cache _ file (11) - lchmod (11)
- lchown (11)
- lex (11)
-
line
_ stub (6) - link (11)
- load (33)
-
load
_ file (11) -
load
_ specification (11) -
load
_ stream (22) - lstat (11)
- lutime (7)
- mkdir (11)
- mkfifo (9)
- mktmpdir (22)
- mtime (11)
- new (450)
-
nowrite
_ flag (11) -
nowrite
_ flag= (11) - of (11)
-
ole
_ show _ help (11) - open (238)
-
open
_ uri (22) - output= (11)
- owned? (11)
- parse (22)
-
parse
_ file (19) -
parser
_ for (11) - path (11)
- pipe? (11)
-
raw
_ data (11) - read (44)
- readable? (11)
-
readable
_ real? (11) - readlines (44)
- readlink (11)
- realdirpath (11)
- realpath (11)
-
remove
_ handler (11) - rename (11)
- report (11)
- result (11)
-
safe
_ load (17) -
scope
_ name (11) -
set
_ get _ line _ procs (22) - setgid? (11)
- setuid? (11)
-
setup
_ argv (1) - sexp (11)
-
sexp
_ raw (11) - size (11)
- size? (11)
- socket? (11)
- split (11)
- start (22)
- stat (11)
- stdout= (11)
- sticky? (11)
- symlink (11)
- symlink? (11)
-
system
_ cache _ file (11) -
to
_ ptr (11) - tokenize (11)
-
total
_ time (11) - truncate (11)
- umask (22)
- unlink (11)
-
user
_ cache _ file (11) - utime (11)
-
verbose
_ flag (11) -
verbose
_ flag= (11) -
world
_ readable? (11) -
world
_ writable? (11) - wrap (55)
- writable? (11)
-
writable
_ real? (11) -
write
_ smime (11) - zero? (11)
検索結果
先頭5件
-
Digest
:: Base . file(path) -> object (18124.0) -
新しいダイジェストオブジェクトを生成し、 ファイル名 file で指定したファイルの内容を読み込み、 そのダイジェストオブジェクトを返します。
...新しいダイジェストオブジェクトを生成し、
ファイル名 file で指定したファイルの内容を読み込み、
そのダイジェストオブジェクトを返します。
@param path 読み込み対象のファイル名です。
@return ダイジェストオブジェク......トを返します。
使用例(SHA256の場合)
require 'digest'
digest = Digest::SHA256.file("X11R6.8.2-src.tar.bz2")
digest.hexdigest
# => "f02e3c85572dc9ad7cb77c2a638e3be24cc1b5bea9fdbb0b0299c9668475c534"... -
File
. file?(path) -> bool (15118.0) -
FileTest.#file? と同じです。
...
FileTest.#file? と同じです。
@param path パスを表す文字列か IO オブジェクトを指定します。... -
File
. lstat(filename) -> File :: Stat (9280.0) -
File.statと同様ですが、シンボリックリンクに関してリンクそのものの 情報を File::Stat として返します。lstat(2) を実装していないシステムでは、File.stat と同じです。
...
File.statと同様ですが、シンボリックリンクに関してリンクそのものの
情報を File::Stat として返します。lstat(2) を実装していないシステムでは、File.stat と同じです。
@param filename ファイル名を表す文字列を指定します。
@ra......ise Errno::EXXX 情報の取得に失敗した場合に発生します。
//emlist[例][ruby]{
# link.rb は t.rb のシンボリックリンク
File.lstat("link.rb") == File.stat("t.rb") # => false
File.stat("link.rb") == File.stat("t.rb") # => true
//}
@see IO#stat, File#lstat... -
File
. stat(filename) -> File :: Stat (9242.0) -
filename の情報を含む File::Stat オブジェクトを生成し て返します。
...
filename の情報を含む File::Stat オブジェクトを生成し
て返します。
@param filename ファイル名を表す文字列を指定します。
@raise Errno::EXXX 情報の取得に失敗した場合に発生します。
//emlist[例][ruby]{
File.stat("testfile").class # => Fi......le::Stat
File.stat("testfile").mtime # => 2017-12-10 01:13:56 +0900
//}
@see IO#stat, File#lstat... -
File
. fnmatch(pattern , path , flags = 0) -> bool (9205.0) -
ファイル名のパターンマッチ fnmatch(3) を行います。 path が pattern にマッチすれば真を返します。そうでない場合には false を返します。
...用できます。
Dir.glob とは違って `**/' は使用できません。
//emlist[例][ruby]{
%w(foo foobar bar).each {|f|
p File.fnmatch("foo*", f)
}
# => true
# true
# false
//}
@param path パスを表す文字列を指定します。
@param flags パターンマッ......る定数は以下のとおりです。
これらの定数は File::Constants で定義されていますが、
File クラスの親クラスの IO が File::Constants をインクルードしているので、
これらの定数は File::FNM_NOESCAPE などとして参照可能です。
: FNM_NOES......ます。
//emlist[][ruby]{
p File.fnmatch('\a', 'a') # => true
p File.fnmatch('\a', '\a', File::FNM_NOESCAPE) # => true
//}
前者で * は、エスケープされているので "*" そのものにマッチ
します。
//emlist[][ruby]{
p File.fnmatch('\*', 'a')... -
File
. fnmatch?(pattern , path , flags = 0) -> bool (9205.0) -
ファイル名のパターンマッチ fnmatch(3) を行います。 path が pattern にマッチすれば真を返します。そうでない場合には false を返します。
...用できます。
Dir.glob とは違って `**/' は使用できません。
//emlist[例][ruby]{
%w(foo foobar bar).each {|f|
p File.fnmatch("foo*", f)
}
# => true
# true
# false
//}
@param path パスを表す文字列を指定します。
@param flags パターンマッ......る定数は以下のとおりです。
これらの定数は File::Constants で定義されていますが、
File クラスの親クラスの IO が File::Constants をインクルードしているので、
これらの定数は File::FNM_NOESCAPE などとして参照可能です。
: FNM_NOES......ます。
//emlist[][ruby]{
p File.fnmatch('\a', 'a') # => true
p File.fnmatch('\a', '\a', File::FNM_NOESCAPE) # => true
//}
前者で * は、エスケープされているので "*" そのものにマッチ
します。
//emlist[][ruby]{
p File.fnmatch('\*', 'a')... -
File
. identical?(filename1 , filename2) -> bool (9201.0) -
FileTest.#identical? と同じです。
...
FileTest.#identical? と同じです。
@param filename1 パスを表す文字列か IO オブジェクトを指定します。
@param filename2 パスを表す文字列か IO オブジェクトを指定します。... -
File
. new(path , mode = "r" , perm = 0666) -> File (9186.0) -
path で指定されるファイルをオープンし、File オブジェクトを生成して 返します。
...、File オブジェクトを生成して
返します。
path が整数の場合はファイルディスクリプタとして扱い、それに対応する
File オブジェクトを生成して返します。IO.open と同じです。
ブロックを指定して呼び出した場合は、File オ......mlist[例: File.new による読み込みモードでのファイルオープン][ruby]{
f = File.new("testfile", "r")
f.class # => File
f.close
//}
//emlist[例: File.open による読み込みモードでのファイルオープン][ruby]{
f = File.open("testfile", "r")
f.class # => File
f.close......//}
//emlist[例: File.open による書き込みモードでのファイルオープン][ruby]{
File.open("testfile", "w", 0755) { |f| f.print "test" }
File.read("testfile") # => "test"
//}... -
File
. open(path , mode = "r" , perm = 0666) -> File (9186.0) -
path で指定されるファイルをオープンし、File オブジェクトを生成して 返します。
...、File オブジェクトを生成して
返します。
path が整数の場合はファイルディスクリプタとして扱い、それに対応する
File オブジェクトを生成して返します。IO.open と同じです。
ブロックを指定して呼び出した場合は、File オ......mlist[例: File.new による読み込みモードでのファイルオープン][ruby]{
f = File.new("testfile", "r")
f.class # => File
f.close
//}
//emlist[例: File.open による読み込みモードでのファイルオープン][ruby]{
f = File.open("testfile", "r")
f.class # => File
f.close......//}
//emlist[例: File.open による書き込みモードでのファイルオープン][ruby]{
File.open("testfile", "w", 0755) { |f| f.print "test" }
File.read("testfile") # => "test"
//}... -
File
. open(path , mode = "r" , perm = 0666) {|file| . . . } -> object (9186.0) -
path で指定されるファイルをオープンし、File オブジェクトを生成して 返します。
...、File オブジェクトを生成して
返します。
path が整数の場合はファイルディスクリプタとして扱い、それに対応する
File オブジェクトを生成して返します。IO.open と同じです。
ブロックを指定して呼び出した場合は、File オ......mlist[例: File.new による読み込みモードでのファイルオープン][ruby]{
f = File.new("testfile", "r")
f.class # => File
f.close
//}
//emlist[例: File.open による読み込みモードでのファイルオープン][ruby]{
f = File.open("testfile", "r")
f.class # => File
f.close......//}
//emlist[例: File.open による書き込みモードでのファイルオープン][ruby]{
File.open("testfile", "w", 0755) { |f| f.print "test" }
File.read("testfile") # => "test"
//}...