るりまサーチ (Ruby 2.4.0)

最速Rubyリファレンスマニュアル検索!
1件ヒット [1-1件を表示] (0.063秒)
トップページ > クエリ:socket[x] > クエリ:new[x] > クエリ:ftype[x] > バージョン:2.4.0[x]

別のキーワード

  1. socket new
  2. socket open
  3. socket udp_server_sockets
  4. socket tcp_server_sockets
  5. socket listen

ライブラリ

クラス

検索結果

File::Stat#ftype -> String (54394.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...