File::Details - File details in an object, stat, hash, etc..
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") # Getting the MD5 sum ( needs Digest::MD5 installed ) my $hash = $details->hash();
Creates a new object, on the filename received as parameter. It generates the stat info.
The stat elements are the same, so:
returns the actual number of system-specific blocks allocated on disk.
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.
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.
Usually we are on irc on irc.perl.org
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: