Skip to content
class method

File.readable?

(::string | ::_ToPath file_name) -> bool
File.readable?(file_name) → true or false

Returns true if the named file is readable by the effective user and group id of this process. See eaccess(3).

Note that some OS-level security features may cause this to return true even though the file is not readable by the effective user/group.

See also .pipe? .readable_real? .path .readlink also in 4.1 · 3.4 · 3.3 · 3.2 · 3.1 · 3.0