NAME
File::Munger - File munging utilities
SYNOPSIS
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',
# ...
}
IMPORTANT NOTE
This module is still being developed. Comments and suggestions are apreciated.
Things that will see their way into the final version:
filetype
Filetype, using File::Magic, the Unix command `file`, if available and extensions.
filecontent
The textual content of the file.
meta-author
Author(s), where available.
meta-title
Title, where available.
???
BASIC FUNCTIONS
new
Creates a new File::Munger object.
my $fm = File::Munger->new('path/to/file');
atime
Last access time in seconds since the epoch.
blksize
Preferred block size for file system I/O.
blocks
Actual number of blocks allocated.
ctime
Inode change time in seconds since the epoch.
dev
Device number of filesystem.
gid
Numeric group ID of file's owner.
ino
Inode number.
mode
File mode (type and permissions).
mtime
Last modify time in seconds since the epoch.
nlink
Number of (hard) links to the file.
rdev
The device identifier (special files only).
size
Total size of file, in bytes.
uid
Numeric user ID of file's owner.
NON-BASIC FUNCTIONS
filetype
Returns the file type.
content
Returns the textual content of the file.
SPECIAL FUNCTIONS
everything
Returns a reference to a hash containing all the possible values.
setup
Performs all necessary calculations for every value that might be asked later on. (NOT IMPLEMENTED YET)
FULL LIST OF FIELDS
atime blksize blocks ctime dev gid ino mode mtime nlink rdev size uid
AUTHOR
Jose Castro, <cog@cpan.org>
Alberto Simoes, <ambs@cpan.org>
COPYRIGHT & LICENSE
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.