るりまサーチ (Ruby 2.1.0)

最速Rubyリファレンスマニュアル検索!
1件ヒット [1-1件を表示] (0.058秒)
トップページ > バージョン:2.1.0[x] > クエリ:IO.read[x] > クエリ:popen[x] > クエリ:gets[x] > クエリ:nread[x] > モジュール:FileTest[x]

別のキーワード

  1. stringio read
  2. _builtin read
  3. io read
  4. csv read
  5. stringio close_read

ライブラリ

検索結果

FileTest.#readable?(file) -> bool (18322.0)

ファイルがカレントプロセスにより読み込み可能な時に真を返します。そうでない場合、ファイルが存在しない場合、あるいはシステムコールに失敗した場合などには false を返します。

...は false を返します。

@param file ファイル名を表す文字列を指定します。

//emlist[例][ruby]{
IO.write("testfile", "")
File.chmod(0644, "testfile")
FileTest
.readable?("testfile") # => true
File.chmod(0200, "testfile")
FileTest
.readable?("testfile") # => false
//}...