33件ヒット
[1-33件を表示]
(0.097秒)
ライブラリ
- ビルトイン (33)
キーワード
- chardev? (11)
-
world
_ readable? (11) -
world
_ writable? (11)
検索結果
先頭3件
-
FileTest
. # chardev?(file) -> bool (6102.0) -
ファイルがキャラクタスペシャルファイルの時に真を返します。そうでない場合、ファイルが存在しない場合、あるいはシステムコールに失敗した場合などには false を返します。
...表す文字列か IO オブジェクトを指定します。
@raise IOError 指定された IO オブジェクト file が既に close されていた場合に発生します。
例:
Dir.glob("/dev/*") { |file|
puts file if FileTest.chardev?(file)
}
# /dev/console
# /dev/tty
# ...... -
FileTest
. # world _ readable?(path) -> Integer | nil (102.0) -
path が全てのユーザから読めるならばそのファイルのパーミッションを表す 整数を返します。そうでない場合は nil を返します。
...path が全てのユーザから読めるならばそのファイルのパーミッションを表す
整数を返します。そうでない場合は nil を返します。
整数の意味はプラットフォームに依存します。
@param path パスを表す文字列を指定します。......m = FileTest.world_readable?("/etc/passwd")
"%o" % m # => "644"... -
FileTest
. # world _ writable?(path) -> bool (102.0) -
path が全てのユーザから書き込めるならば、そのファイルのパーミッションを表す 整数を返します。そうでない場合は nil を返します。
...path が全てのユーザから書き込めるならば、そのファイルのパーミッションを表す
整数を返します。そうでない場合は nil を返します。
整数の意味はプラットフォームに依存します。
@param path パスを表す文字列を指定し......ます。
m = FileTest.world_writable?("/tmp")
"%o" % m #=> "777"...