File::Stat::OO - OO interface for accessing file status attributes
Version 0.03
use File::Stat::OO; my $foo = File::Stat::OO->new({file => '/etc/password'}); $foo->stat; # stat file specified at instantiation time print $foo->size; print $foo->mtime; # modification time in epoch seconds
or inflate epoch seconds into DateTime objects
my $foo = File::Stat::OO->new(); $foo->use_datetime(1); # Or the two lines above can be combined as # my $foo = File::Stat::OO->new({use_datetime => 1}); $foo->stat('/etc/password'); # pass file name to the stat method print $foo->mtime; # returns DateTime object not an epoch print $foo->mtime->epoch; # epoch seconds
Generate stat information. Takes an optional filename parameter
If set, invocations of stat will record times as DateTime objects rather than epoch seconds
device number of filesystem
inode number
file mode type and permissions
number of (hard) links to the file
numeric user ID of the file's owner
name of the file owner
numeric group ID of the file's owner
group name of the file's owner
the device identifier (special files only)
size of the file in bytes
last access time (DateTime object)
last modify time (DateTime object)
inode chane time (DateTime object)
preferred blocksize for file system I/O
actual number of blocks allocated
Dan Horne, <dhorne at cpan.org>
<dhorne at cpan.org>
Please report any bugs or feature requests to bug-file-stat-oo at rt.cpan.org, or through the web interface at http://rt.cpan.org/NoAuth/ReportBug.html?Queue=File-Stat-OO. I will be notified, and then you'll automatically be notified of progress on your bug as I make changes.
bug-file-stat-oo at rt.cpan.org
You can find documentation for this module with the perldoc command.
perldoc File::Stat::OO
You can also look for information at:
AnnoCPAN: Annotated CPAN documentation
http://annocpan.org/dist/File-Stat-OO
CPAN Ratings
http://cpanratings.perl.org/d/File-Stat-OO
RT: CPAN's request tracker
http://rt.cpan.org/NoAuth/Bugs.html?Dist=File-Stat-OO
Search CPAN
http://search.cpan.org/dist/File-Stat-OO
File::stat - File::Stat::OO provides additonal functionality such as:
File::stat
* Optionally returning the atime, ctime and mtime values as DateTime objects instead of epoch seconds * Providing the name and owner of the file in addition to the uid and gid
Copyright 2008 Dan Horne, all rights reserved.
This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
To install File::Stat::OO, copy and paste the appropriate command in to your terminal.
cpanm
cpanm File::Stat::OO
CPAN shell
perl -MCPAN -e shell install File::Stat::OO
For more information on module installation, please visit the detailed CPAN module installation guide.