Skip to content

Maintenance Ruby 3.3 gets fixes, but no new features. Switch to Ruby 4.0 →

instance method

IO#stat

ios.stat → stat

Returns status information for ios as an object of type File::Stat.

Example
f = File.new("testfile")
s = f.stat
"%o" % s.mode   #=> "100644"
s.blksize       #=> 4096
s.atime         #=> Wed Apr 09 08:53:54 CDT 2003
See also #set_encoding_by_bom #sync #set_encoding #sync= also in 4.1 · 4.0 · 3.4 · 3.2 · 3.1 · 3.0