るりまサーチ

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

別のキーワード

  1. io popen
  2. io pipe
  3. io each
  4. io each_line
  5. io readlines

ライブラリ

キーワード

検索結果

<< < 1 2 3 >>

FileTest.#sticky?(file) -> bool (14.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") # => fal...

FileTest.#executable_real?(file) -> bool (8.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") # => false
//}...

FileTest.#readable?(file) -> bool (8.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
//}...

FileTest.#symlink?(file) -> bool (8.0)

ファイルがシンボリックリンクである時に真を返します。そうでない場合、ファイルが存在しない場合、あるいはシステムコールに失敗した場合などには false を返します。

...た場合などには false を返します。

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

//emlist[例][ruby]{
IO
.write("testfile", "test")
FileTest
.symlink?("testfile") # => false
File.symlink("testfile", "testlink")
FileTest
.symlink?("testlink") # => true
//}...

FileTest.#writable?(file) -> bool (8.0)

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

...false を返します。

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

//emlist[例][ruby]{
IO
.write("testfile", "test")
File.chmod(0600, "testfile")
FileTest
.writable?("testfile") # => true
File.chmod(0400, "testfile")
FileTest
.writable?("testfile") # => false
//}...

絞り込み条件を変える

<< < 1 2 3 >>