77件ヒット
[1-77件を表示]
(0.135秒)
種類
- モジュール関数 (55)
- 特異メソッド (11)
- インスタンスメソッド (11)
クラス
- File (11)
-
File
:: Stat (11)
モジュール
- FileTest (11)
- Kernel (22)
-
Process
:: Sys (22)
検索結果
先頭5件
-
Process
:: Sys . # setuid(id) -> nil (32219.0) -
システムコールの setuid(2) を呼びます。
...システムコールの setuid(2) を呼びます。
@raise NotImplementedError システムコールが現在のプラットフォームで提供されていない場合に発生します。
@raise Errno::EXXX システムコールに失敗した場合に発生します。... -
FileTest
. # setuid?(file) -> bool (23231.0) -
ファイルが setuid(2) されている時に真を返 します。そうでない場合、ファイルが存在しない場合、あるいはシステムコールに失敗した場合などには false を返します。
...ファイルが setuid(2) されている時に真を返
します。そうでない場合、ファイルが存在しない場合、あるいはシステムコールに失敗した場合などには false を返します。
@param file ファイル名を表す文字列か IO オブジェクトを......se IOError 指定された IO オブジェクト file が既に close されていた場合に発生します。
//emlist[例][ruby]{
require 'fileutils'
IO.write("testfile", "")
FileUtils.chmod("u+s", "testfile")
FileTest.setuid?("testfile") # => true
FileUtils.chmod("u-s", "testfile")
FileTe......st.setuid?("testfile") # => false
//}... -
File
:: Stat # setuid? -> bool (20225.0) -
setuidされている時に真を返します。
...setuidされている時に真を返します。
//emlist[][ruby]{
Dir.glob("/bin/*") {|bd|
if File::Stat.new(bd).setuid?
puts bd
end
}
#例
#...
#=> /bin/ping
#=> /bin/su
#...
//}... -
File
. setuid?(path) -> bool (20219.0) -
FileTest.#setuid? と同じです。
...FileTest.#setuid? と同じです。
@param path パスを表す文字列か IO オブジェクトを指定します。... -
Kernel
. # test(cmd , file1 , file2) -> bool (14122.0) -
2ファイル間のファイルテストを行います。
...ンドとみなします。
@param file1 テストするファイルのパスを表す文字列か IO オブジェクトを指定します。
@param file2 テストするファイルのパスを表す文字列か IO オブジェクトを指定します。
@return 真偽値を返します。
以下......イル1とファイル2が同一のファイルである
//emlist[例][ruby]{
IO.write("testfile1", "test1")
IO.write("testfile2", "test2")
%w(= < > -).each do |e|
result = test(e, "testfile1", "testfile2")
puts "#{e}: #{result}"
end
//}
# => =: true
# => <: false
# => >: false
# => -: false... -
Kernel
. # test(cmd , file) -> bool | Time | Integer | nil (14117.0) -
単体のファイルでファイルテストを行います。
...文字列の場合はその先頭の文字だけをコマンドとみなします。
@param file テストするファイルのパスを表す文字列か IO オブジェクトを指定します。
@return 下表に特に明記していないものは、真偽値を返します。
以下は cmd と......: ?O
ファイルの所有者が実 uid である
: ?e
ファイルが存在する
: ?z
ファイルサイズが 0 である
: ?s
ファイルサイズが 0 でない (ファイルサイズを返す、0 ならば nil) -> Integer|nil
: ?f
ファイルはプレーンファイルで......る
: ?u
ファイルに setuid ビットがセットされている
: ?g
ファイルに setgid ビットがセットされている
: ?k
ファイルに sticky ビットがセットされている
: ?M
ファイルの最終更新時刻を返す -> Time
: ?A
ファイルの最... -
Process
:: Sys . # issetugid -> bool (14108.0) -
システムコールの issetugid() を呼びます。
...システムコールの issetugid() を呼びます。
プロセスが setuid もしくは setgid ビットを使って
起動されている場合に真を返します。
@raise NotImplementedError システムコールが現在のプラットフォームで提供されていない場合に発...