Ruby 1.9.3 リファレンスマニュアル > ライブラリ一覧 > 組み込みライブラリ > File::Statクラス > world_writable?

instance method File::Stat#world_writable?

world_writable? -> Fixnum | nil

If stat is writable by others, returns an integer representing the file permission bits of stat. Returns nil otherwise. The meaning of the bits is platform dependent; on Unix systems, see stat(2).

m = File.stat("/tmp").world_writable?         # => 511
sprintf("%o", m)                              # => "777"
class File::Stat