るりまサーチ (Ruby 2.5.0)

最速Rubyリファレンスマニュアル検索!
1件ヒット [1-1件を表示] (0.132秒)

別のキーワード

  1. new openssl::bn
  2. new openssl::asn1::asn1data
  3. new openssl::pkey::ec::group
  4. new openssl::x509::certificate
  5. start net::smtp

クラス

検索結果

File::Stat#ftype -> String (117382.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 以降では、属性メソッドがシステムでサポートされていない場合 nil...