NAME
File::Details - File details in an object, stat, hash, etc..
SYNOPSIS
This module provides a class, File::Details that returns an object with stats and optionally other information about some file.
Instead creating hashs or even other classes to represent this, we simple can use File::Details. It also works like an stat that returns an object.
use File::Details;
my $details = File::Details->new( "filename" );
my $size = $detais->size(); # same output as stat("filename")[7]
# Getting the MD5 sum ( needs Digest::MD5 installed )
my $hash = $details->hash();
METHODS
new
Creates a new object, on the filename received as parameter. It generates the stat info.
dev ino mode etc...
The stat elements are the same, so:
$details->blocks();
returns the actual number of system-specific blocks allocated on disk.
hash
Returns the MD5sum from the contents of the file. It calculates when the hash method is called for the first time. Another calls will return the same value calculated on first time.
AUTHOR
RECSKY, <recsky@cpan.org>
BUGS
Please report any bugs or feature requests to bug-file-details at rt.cpan.org
, or through the web interface at http://rt.cpan.org/NoAuth/ReportBug.html?Queue=File-Details.
SUPPORT
Usually we are on irc on irc.perl.org
#sao-paulo.pm
#perl
LICENSE AND COPYRIGHT
Copyright 2015 RECSKY
This program is free software; you can redistribute it and/or modify it under the terms of the the Artistic License (2.0). You may obtain a copy of the full license at: