るりまサーチ (Ruby 2.5.0)

最速Rubyリファレンスマニュアル検索!
1件ヒット [1-1件を表示] (0.009秒)
トップページ > モジュール:FileTest[x] > バージョン:2.5.0[x] > クエリ:sticky?[x]

別のキーワード

  1. _builtin sticky?
  2. pathname sticky?
  3. stat sticky?
  4. file sticky?
  5. filetest sticky?

ライブラリ

検索結果

FileTest.#sticky?(file) -> bool (54304.0)

ファイルの sticky ビット(chmod(2) 参照)が 立っている時に真を返します。そうでない場合、ファイルが存在しない場合、あるいはシステムコールに失敗した場合などには false を返します。

...名を表す文字列か IO オブジェクトを指定します。

//emlist[例][ruby]{
require 'fileutils'
IO.write("testfile", "")
FileUtils.chmod("o+t", "testfile")
FileTest
.sticky?("testfile") # => true
FileUtils.chmod("o-t", "testfile")
FileTest
.sticky?("testfile") # => false
//}...