Skip to content
instance method

File::Stat#world_writable?

() -> ::Integer?
stat.world_writable? → integer or 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).

Example
m = File.stat("/tmp").world_writable?         #=> 511
sprintf("%o", m)                              #=> "777"
See also #world_readable? #writable? #uid #writable_real? also in 4.1 · 3.4 · 3.3 · 3.2 · 3.1 · 3.0