5件ヒット
[1-5件を表示]
(0.159秒)
クラス
-
File
:: Stat (2) - Pathname (2)
-
RDoc
:: Options (1)
キーワード
- <=> (1)
- lstat (1)
- size? (1)
-
static
_ path= (1)
検索結果
先頭5件
-
Pathname
# stat -> File :: Stat (63976.0) -
File.stat(self.to_s) と同じです。
File.stat(self.to_s) と同じです。
@see File.stat -
Pathname
# lstat -> File :: Stat (45907.0) -
File.lstat(self.to_s) と同じです。
File.lstat(self.to_s) と同じです。
@see File.lstat -
RDoc
:: Options # static _ path=(vals) (36907.0) -
コマンドライン引数の --copy-files オプションと同様の指定を行います。
コマンドライン引数の --copy-files オプションと同様の指定を行います。
@param vals パスを文字列の配列で指定します。 -
File
:: Stat # <=>(o) -> Integer | nil (18520.0) -
ファイルの最終更新時刻を比較します。self が other よりも 新しければ正の数を、等しければ 0 を古ければ負の数を返します。 比較できない場合は nil を返します。
ファイルの最終更新時刻を比較します。self が other よりも
新しければ正の数を、等しければ 0 を古ければ負の数を返します。
比較できない場合は nil を返します。
@param o File::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.n... -
File
:: Stat # size? -> Integer | nil (18394.0) -
サイズが0の時にはnil、それ以外の場合はファイルサイズを返します。
サイズが0の時にはnil、それ以外の場合はファイルサイズを返します。
//emlist[][ruby]{
require 'tempfile'
fp = Tempfile.new("temp")
p fp.size #=> 0
p File::Stat.new(fp.path).size? #=> nil
fp.print "not 0 "
fp.close
p FileTest.exist?(fp.path) #=> true
p File::Stat.new(fp.path).size? #=> 6
//}