るりまサーチ

最速Rubyリファレンスマニュアル検索!
473件ヒット [1-100件を表示] (0.351秒)
トップページ > クエリ:-[x] > クエリ:E[x] > クエリ:I[x] > クラス:File::Stat[x]

別のキーワード

  1. _builtin -
  2. open-uri open
  3. irb/input-method new
  4. irb/input-method gets
  5. matrix -

ライブラリ

キーワード

検索結果

<< 1 2 3 ... > >>

File::Stat#file? -> bool (15301.0)

通常ファイルの時に真を返します。

...通常ファイルの時に真を返します。

//emlist[][ruby]{
p File::Stat.new($0).file? #=> true
//}...

File::Stat#ctime -> Time (12533.0)

最終状態変更時刻を返します。 (状態の変更とは chmod などによるもので、Unix では i-node の変更を意味します)

...最終状態変更時刻を返します。
(状態の変更とは chmod などによるもので、Unix では i-node の変更を意味します)

//emlist[][ruby]{
fs = File::Stat.new($0)
#例
p fs.ctime.to_f #=> 1188719843.0
//}


@see Time...

File::Stat#atime -> Time (12501.0)

最終アクセス時刻を返します。

...最終アクセス時刻を返します。

//emlist[][ruby]{
fs = File::Stat.new($0)
#例
p fs.atime.to_a #=> [45, 5, 21, 5, 9, 2007, 3, 248, false, "\223\214\213\236 (\225W\217\200\216\236) "]
//}

@see Time...

File::Stat#mtime -> Time (12501.0)

最終更新時刻を返します。

...最終更新時刻を返します。

//emlist[][ruby]{
fs = File::Stat.new($0)
#例
p fs.mtime #=> Wed Sep 05 20:42:18 +0900 2007
//}

@see Time...

File::Stat#birthtime -> Time (12449.0)

作成された時刻を返します。

...raise NotImplementedError Windows のような birthtime のない環境で発生します。

//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("testfile").ctime #=> 2014-02-24 11:19:37 +0900
File.stat("testfile").atime #=> 2014-02-24 11:19:47 +0900
//}...

絞り込み条件を変える

File::Stat#dev_minor -> Integer (12401.0)

dev の minor 番号部を返します。

...dev の minor 番号部を返します。

//emlist[][ruby]{
fs = File::Stat.new($0)
p fs.dev_minor
#例
#=> nil
//}...

File::Stat#rdev_minor -> Integer (12401.0)

rdev の minor 番号部を返します。

...rdev の minor 番号部を返します。

//emlist[][ruby]{
fs = File::Stat.new($0)
#例
p fs.rdev_minor #=> nil
//}...

File::Stat#blksize -> Integer (12317.0)

望ましいI/Oのブロックサイズを返します。

...望ましいI/Oのブロックサイズを返します。

//emlist[][ruby]{
fs = File::Stat.new($0)
#例
p fs.blksize #=> nil
//}...

File::Stat#directory? -> bool (12301.0)

ディレクトリの時に真を返します。

...ディレクトリの時に真を返します。

//emlist[][ruby]{
p File::Stat.new($0).directory? #=> false
//}

@see FileTest.#directory?...

File::Stat#pipe? -> bool (12301.0)

無名パイプおよび名前つきパイプ(FIFO)の時に真を返します。

...無名パイプおよび名前つきパイプ(FIFO)の時に真を返します。

//emlist[][ruby]{
system("mkfifo /tmp/pipetest")
p File::Stat.new("/tmp/pipetest").pipe? #=> true
//}...

絞り込み条件を変える

<< 1 2 3 ... > >>