File::Munger - File munging utilities
startup
use File::Munger;
my $file = File::Munger->new('path/to/file');
normal mode
my $file_size = $file->size;
my $file_mode = $file->mode;
# ...
a couple of extras
my $foo = $file->everything;
# $foo now holds something like this
{
size => 10321,
filetype => 'txt',
content => 'This is the content of the file',
# ...
}
This module is still being developed. Comments and suggestions are apreciated.
Things that will see their way into the final version:
Filetype, using File::Magic, the Unix command `file`, if available and extensions.
The textual content of the file.
Author(s), where available.
Title, where available.
Creates a new File::Munger object.
my $fm = File::Munger->new('path/to/file');
Last access time in seconds since the epoch.
Preferred block size for file system I/O.
Actual number of blocks allocated.
Inode change time in seconds since the epoch.
Device number of filesystem.
Numeric group ID of file's owner.
Inode number.
File mode (type and permissions).
Last modify time in seconds since the epoch.
Number of (hard) links to the file.
The device identifier (special files only).
Total size of file, in bytes.
Numeric user ID of file's owner.
Returns the file type.
Returns the textual content of the file.
Returns a reference to a hash containing all the possible values.
Performs all necessary calculations for every value that might be asked later on. (NOT IMPLEMENTED YET)
atime blksize blocks ctime dev gid ino mode mtime nlink rdev size uid
Jose Castro, <cog@cpan.org>
Alberto Simoes, <ambs@cpan.org>
Copyright 2004 Jose Castro & Alberto Simoes, All Rights Reserved.
This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.