33件ヒット
[1-33件を表示]
(0.046秒)
別のキーワード
クラス
- File (11)
-
File
:: Stat (22)
検索結果
-
File
:: Stat # uid -> Integer (18110.0) -
オーナーのユーザIDを返します。
...オーナーのユーザIDを返します。
//emlist[][ruby]{
fs = File::Stat.new($0)
#例
p fs.uid #=> 0
//}... -
File
:: Stat # setuid? -> bool (6103.0) -
setuidされている時に真を返します。
...setuidされている時に真を返します。
//emlist[][ruby]{
Dir.glob("/bin/*") {|bd|
if File::Stat.new(bd).setuid?
puts bd
end
}
#例
#...
#=> /bin/ping
#=> /bin/su
#...
//}... -
File
# chown(owner , group) -> 0 (9.0) -
ファイルのオーナーとグループを変更します。
...ます。
@raise Errno::EXXX 変更に失敗した場合に発生します。
//emlist[例][ruby]{
File.open("testfile") { |f| f.chown(502, 1000) } # => 0
File.stat("testfile").uid # => 502
File.stat("testfile").gid # => 1000
//}
@see File.chown...