zero?

stat.zero? â true or false Instance Public methods Returns true if stat is a zero-length file; false otherwise. File.stat("testfile").zero? #=> false

writable_real?

stat.writable_real? â true or false Instance Public methods Returns true if stat is writable by the real user id of this process. File.stat("testfile").writable_real? #=> true

writable?

stat.writable? â true or false Instance Public methods Returns true if stat is writable by the effective user id of this process. File.stat("testfile").writable? #=> true

world_writable?

stat.world_writable? â fixnum or nil Instance Public methods 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"

world_readable?

stat.world_readable? â fixnum or nil Instance Public methods If stat is readable 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("/etc/passwd").world_readable? #=> 420 sprintf("%o", m) #=> "644"

uid

stat.uid â fixnum Instance Public methods Returns the numeric user id of the owner of stat. File.stat("testfile").uid #=> 501

symlink?

stat.symlink? â true or false Instance Public methods Returns true if stat is a symbolic link, false if it isn't or if the operating system doesn't support this feature. As File::stat automatically follows symbolic links, symlink? will always be false for an object returned by File::stat. File.symlink("testfile", "alink") #=> 0 File.stat("alink").symlink? #=> false File.lstat("alink").symlink? #=> true

sticky?

stat.sticky? â true or false Instance Public methods Returns true if stat has its sticky bit set, false if it doesn't or if the operating system doesn't support this feature. File.stat("testfile").sticky? #=> false

socket?

stat.socket? â true or false Instance Public methods Returns true if stat is a socket, false if it isn't or if the operating system doesn't support this feature. File.stat("testfile").socket? #=> false

size?

state.size â integer Instance Public methods Returns the size of stat in bytes. File.stat("testfile").size #=> 66