116件ヒット
[101-116件を表示]
(0.031秒)
ライブラリ
- ビルトイン (87)
- pathname (11)
- shell (6)
-
shell
/ command-processor (6) -
shell
/ filter (6)
クラス
- File (65)
-
File
:: Stat (11) - IO (11)
- Pathname (11)
- Shell (6)
-
Shell
:: CommandProcessor (6) -
Shell
:: Filter (6)
検索結果
-
IO
# stat -> File :: Stat (18390.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... -
File
:: Stat # symlink? -> false (6081.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...