973件ヒット
[1-100件を表示]
(0.041秒)
別のキーワード
クラス
-
Enumerator
:: Lazy (24) - File (24)
-
File
:: Stat (504) - IO (12)
-
JSON
:: State (216) - Pathname (12)
-
Rake
:: Application (12) -
Ripper
:: Lexer (16) - Thread (21)
モジュール
- FileUtils (12)
-
JSON
:: Generator :: GeneratorMethods :: Array (12) -
JSON
:: Generator :: GeneratorMethods :: FalseClass (12) -
JSON
:: Generator :: GeneratorMethods :: Float (12) -
JSON
:: Generator :: GeneratorMethods :: Hash (12) -
JSON
:: Generator :: GeneratorMethods :: Integer (12) -
JSON
:: Generator :: GeneratorMethods :: NilClass (12) -
JSON
:: Generator :: GeneratorMethods :: Object (12) -
JSON
:: Generator :: GeneratorMethods :: String (12) -
JSON
:: Generator :: GeneratorMethods :: TrueClass (12) -
OpenURI
:: Meta (12)
キーワード
- <=> (12)
-
abort
_ on _ exception= (12) -
allow
_ nan? (12) -
array
_ nl (12) -
array
_ nl= (12) - atime (12)
- birthtime (12)
- blksize (12)
- blockdev? (12)
- blocks (12)
- chardev? (12)
-
check
_ circular? (12) - chown (24)
- chunk (12)
- configure (12)
- ctime (12)
- dev (12)
-
dev
_ major (12) -
dev
_ minor (12) - directory? (12)
- executable? (12)
-
executable
_ real? (12) - file? (12)
- ftype (12)
- gid (12)
- grpowned? (12)
- indent (12)
- indent= (12)
- ino (12)
- lex (8)
- lstat (12)
-
max
_ nesting (12) -
max
_ nesting= (12) - merge (12)
- mode (12)
- mtime (12)
- nlink (12)
-
object
_ nl (12) -
object
_ nl= (12) - owned? (12)
- parse (8)
- pipe? (12)
- rdev (12)
-
rdev
_ major (12) -
rdev
_ minor (12) - readable? (12)
-
readable
_ real? (12) -
report
_ on _ exception= (9) - setgid? (12)
- setuid? (12)
- size (12)
- size? (12)
-
slice
_ before (12) - socket? (12)
- space (12)
- space= (12)
-
space
_ before (12) -
space
_ before= (12) - status (12)
- sticky? (12)
- symlink? (12)
-
to
_ h (12) -
to
_ hash (12) -
to
_ json (108) -
tty
_ output= (12) - uid (12)
-
world
_ readable? (12) -
world
_ writable? (12) - writable? (12)
-
writable
_ real? (12) - zero? (12)
検索結果
先頭5件
-
IO
# stat -> File :: Stat (18237.0) -
ファイルのステータスを含む File::Stat オブジェクトを生成して 返します。
...テータスを含む File::Stat オブジェクトを生成して
返します。
@raise Errno::EXXX ステータスの読み込みに失敗した場合に発生します。
@raise IOError 既に close されていた場合に発生します。
//emlist[例][ruby]{
IO.write("testfile", "This is......line one\nThis is line two\n")
File.open("testfile") do |f|
s = f.stat
"%o" % s.mode # => "100644"
s.blksize # => 4096
s.atime # => 2018-03-01 23:19:59 +0900
end
//}
@see File#lstat, File.stat, File.lstat... -
FileUtils
# ruby(*args) {|result , status| . . . } (18230.0) -
与えられた引数で Ruby インタプリタを実行します。
...与えられた引数で Ruby インタプリタを実行します。
@param args Ruby インタプリタに与える引数を指定します。
例:
ruby %{-pe '$_.upcase!' <README}
@see Kernel.#sh... -
File
# lstat -> File :: Stat (6270.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... -
OpenURI
:: Meta # status -> [String] (6107.0) -
対象となるリソースのステータスコードと reason phrase を文字列の配列として返します。
...対象となるリソースのステータスコードと reason phrase を文字列の配列として返します。
//emlist[例][ruby]{
require 'open-uri'
open('http://example.com/') {|f|
p f.status #=> ["200", "OK"]
}
//}......対象となるリソースのステータスコードと reason phrase を文字列の配列として返します。
//emlist[例][ruby]{
require 'open-uri'
URI.open('http://example.com/') {|f|
p f.status #=> ["200", "OK"]
}
//}... -
File
:: Stat # <=>(o) -> Integer | nil (3043.0) -
ファイルの最終更新時刻を比較します。self が other よりも 新しければ正の数を、等しければ 0 を古ければ負の数を返します。 比較できない場合は nil を返します。
...::Stat のインスタンスを指定します。
//emlist[][ruby]{
require 'tempfile' # for Tempfile
fp1 = Tempfile.open("first")
fp1.print "古い方\n"
sleep(1)
fp2 = Tempfile.open("second")
fp2.print "新しい方\n"
p File::Stat.new(fp1.path) <=> File::Stat.new(fp2.path) #=> -1
p File::Stat.......new(fp2.path) <=> File::Stat.new(fp1.path) #=> 1
p File::Stat.new(fp1.path) <=> fp2.path #=> nil
//}... -
File
:: Stat # birthtime -> Time (3031.0) -
作成された時刻を返します。
...emlist[][ruby]{
File.write("testfile", "foo")
sleep 10
File.write("testfile", "bar")
sleep 10
File.chmod(0644, "testfile")
sleep 10
File.read("testfile")
File.stat("testfile").birthtime #=> 2014-02-24 11:19:17 +0900
File.stat("testfile").mtime #=> 2014-02-24 11:19:27 +0900
File.stat("testfil......e").ctime #=> 2014-02-24 11:19:37 +0900
File.stat("testfile").atime #=> 2014-02-24 11:19:47 +0900
//}... -
File
:: Stat # symlink? -> false (3029.0) -
シンボリックリンクである時に真を返します。 ただし、File::Statは自動的にシンボリックリンクをたどっていくので 常にfalseを返します。
...す。
ただし、File::Statは自動的にシンボリックリンクをたどっていくので
常にfalseを返します。
//emlist[][ruby]{
require 'fileutils'
outfile = $0 + ".ln"
FileUtils.ln_s($0, outfile)
p File::Stat.new(outfile).symlink? #=> false
p File.lstat(outfile).symlink? #=>......true
p FileTest.symlink?(outfile) #=> true
//}
@see File.lstat... -
File
:: Stat # grpowned? -> bool (3025.0) -
グループIDが実効グループIDと等しい時に真を返します。
...ープIDと等しい時に真を返します。
補助グループIDは考慮されません。
//emlist[][ruby]{
printf "%s %s\n", $:[0], File::Stat.new($:[0]).grpowned?
#例
#=> /usr/local/lib/site_ruby/1.8 false
printf "%s %s\n", $0, File::Stat.new($0).grpowned?
#例
#=> filestat.rb true
//}... -
File
:: Stat # ftype -> String (3019.0) -
ファイルのタイプを表す文字列を返します。
..."file"
"directory"
"characterSpecial"
"blockSpecial"
"fifo"
"link"
"socket"
"unknown"
//emlist[例][ruby]{
fs = File::Stat.new($0)
p fs.ftype #=> "file"
p File::Stat.new($:[0]).ftype #=> "directory"
//}
1.8 以降では、属性メソッドがシステムでサポートされて...