executable?

stat.executable? â true or false Instance Public methods Returns true if stat is executable or if the operating system doesn't distinguish executable files from nonexecutable files. The tests are made using the effective owner of the process. File.stat("testfile").executable? #=> false

executable_real?

stat.executable_real? â true or false Instance Public methods Same as executable?, but tests using the real owner of the process.

file?

stat.file? â true or false Instance Public methods Returns true if stat is a regular file (not a device file, pipe, socket, etc.). File.stat("testfile").file? #=> true

ftype

stat.ftype â string Instance Public methods Identifies the type of stat. The return string is one of: âfile'', âdirectory'', âcharacterSpecial'', âblockSpecial'', âfifo'', âlink'', âsocket'', or âunknown''. File.stat("/dev/tty").ftype #=> "characterSpecial"

gid

stat.gid â fixnum Instance Public methods Returns the numeric group id of the owner of stat. File.stat("testfile").gid #=> 500

grpowned?

stat.grpowned? â true or false Instance Public methods Returns true if the effective group id of the process is the same as the group id of stat. On Windows NT, returns false. File.stat("testfile").grpowned? #=> true File.stat("/etc/passwd").grpowned? #=> false

ino

stat.ino â fixnum Instance Public methods Returns the inode number for stat. File.stat("testfile").ino #=> 1083669

inspect

stat.inspect â string Instance Public methods Produce a nicely formatted description of stat. File.stat("/etc/passwd").inspect #=> "#<File::Stat dev=0xe000005, ino=1078078, mode=0100644, # nlink=1, uid=0, gid=0, rdev=0x0, size=1374, blksize=4096, # blocks=8, atime=Wed Dec 10 10:16:12 CST 2003, # mtime=Fri Sep 12 15:41:41 CDT 2003, # ctime=Mon Oct 27 11:20:27 CST 2003>"

mode

stat.mode â fixnum Instance Public methods Returns an integer representing the permission bits of stat. The meaning of the bits is platform dependent; on Unix systems, see stat(2). File.chmod(0644, "testfile") #=> 1 s = File.stat("testfile") sprintf("%o", s.mode) #=> "100644"

mtime

stat.mtime â aTime Instance Public methods Returns the modification time of stat. File.stat("testfile").mtime #=> Wed Apr 09 08:53:14 CDT 2003