Skip to content

Preview Ruby 4.1 is a preview. It can change before the final release. Switch to Ruby 4.0 →

instance method

FileTest#writable_real?

(::path file_name) -> bool
File.writable_real?(object) → true or false

Like File.writable?, but checks against the real owner and group instead of the effective owner and group.

Note that filesystem security features may cause this method to return true even when the object is not writable by the real owner and group.

See also #writable? #zero? #world_writable? also in 4.0 · 3.4 · 3.3 · 3.2 · 3.1 · 3.0