NAME

File::Stat::OO - OO interface for accessing file status attributes

VERSION

Version 0.02

SYNOPSIS

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

METHODS

stat

Generate stat information. Takes an optional filename parameter

use_datetime

If set, invocations of stat will record times as DateTime objects rather than epoch seconds

dev

device number of filesystem

ino

inode number

mode

file mode type and permissions

number of (hard) links to the file

uid

numeric user ID of the file's owner

owner

name of the file owner

gid

numeric group ID of the file's owner

group

group name of the file's owner

rdev

the device identifier (special files only)

size

size of the file in bytes

atime

last access time (DateTime object)

mtime

last modify time (DateTime object)

ctime

inode chane time (DateTime object)

blksize

preferred blocksize for file system I/O

blocks

actual number of blocks allocated

AUTHOR

Dan Horne, <dhorne at cpan.org>

BUGS

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.

SUPPORT

You can find documentation for this module with the perldoc command.

perldoc File::Stat::OO

You can also look for information at:

SEE ALSO

File::stat - File::Stat::OO provides additonal functionality such as:

* 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 & LICENSE

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.