るりまサーチ

最速Rubyリファレンスマニュアル検索!
12件ヒット [1-12件を表示] (0.041秒)
トップページ > クエリ:Ruby[x] > クエリ:file[x] > 種類:モジュール関数[x] > クエリ:test[x] > モジュール:FileTest[x] > クエリ:executable_real?[x]

別のキーワード

  1. kernel test
  2. _builtin test
  3. rubygems/test_utilities tempio
  4. rubygems/test_utilities fetcher=
  5. specification test_file

ライブラリ

検索結果

FileTest.#executable_real?(file) -> bool (24227.0)

ファイルがカレントプロセスの実ユーザか実グループで実行できる時に真を返します。そうでない場合、ファイルが存在しない場合、あるいはシステムコールに失敗した場合などには false を返します。

...を返します。

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

//emlist[例][ruby]{
IO.write("empty.txt", "")
File
.chmod(0744, "empty.txt")
FileTest
.executable_real?("empty.txt") # => true
File
.chmod(0644, "empty.txt")
FileTest
.executable_real?("empty.txt") # => fa...