るりまサーチ

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

別のキーワード

  1. _builtin file?
  2. _builtin file
  3. file chmod
  4. file umask
  5. file truncate

ライブラリ

クラス

キーワード

検索結果

File::Stat#uid -> Integer (24220.0)

オーナーのユーザIDを返します。

...オーナーのユーザIDを返します。

//emlist[][ruby]{
fs = File::Stat.new($0)
#例
p fs.uid #=> 0
//}...

File::Stat#setuid? -> bool (15213.0)

setuidされている時に真を返します。

...setuidされている時に真を返します。

//emlist[][ruby]{
Dir.glob("/bin/*") {|bd|
if File::Stat.new(bd).setuid?
puts bd
end
}
#例
#...
#=> /bin/ping
#=> /bin/su
#...
//}...

Pathname#chown(owner, group) -> Integer (3147.0)

File.chown(owner, group, self.to_s) と同じです。

...File.chown(owner, group, self.to_s) と同じです。

@param owner オーナーを指定します。

@param group グループを指定します。

//emlist[例][ruby]{
require 'pathname'

Pathname('testfile').stat.uid # => 501
Pathname('testfile').chown(502, 12)
Pathname('testfile').stat.ui...
...d # => 502
//}

@see File.chown, File#chown...