Class | File::Stat |
In: |
lib/win32/file/stat.rb
|
Parent: | Object |
VERSION | = | '1.2.7' | ||
S_IWGRP | = | 0020 | Defined in Ruby‘s win32.h. Not meant for public consumption. | |
S_IWOTH | = | 0002 |
initialize | -> | old_init |
This is the only way to avoid a -w warning for initialize. We remove it later, after we‘ve defined our initialize method. |
dev_major | [R] | |
dev_minor | [R] | |
rdev_major | [R] | |
rdev_minor | [R] |
Creates and returns a File::Stat object, which encapsulate common status information for File objects on MS Windows sytems. The information is recorded at the moment the File::Stat object is created; changes made to the file after that point will not be reflected.
Returns whether or not the file is a block device. For MS Windows a block device is a removable drive, cdrom or ramdisk.
Returns a Time object containing the time that the file status associated with the file was changed.
Drive letter (A-Z) of the disk containing the file. If the path is a UNC path then the drive number (probably -1) is returned instead.
Returns whether or not the file is executable. Generally speaking, this means .bat, .cmd, .com, and .exe files.
Identifies the type of file. The return string is one of: file, directory, characterSpecial, socket or unknown.
Bit mask for file-mode information.
:no-doc: This was taken from rb_win32_stat() in win32.c. I‘m not entirely sure what the point is.
Returns whether or not the file is ‘normal’. This is only true if virtually all other attributes are false.
A custom pretty print method. This was necessary not only to handle the additional attributes, but to work around an error caused by the builtin method for the current File::Stat class (see pp.rb).
Returns nil if statfile is a zero-length file; otherwise, returns the file size. Usable as a condition in tests.