PFT::Content::File - On disk content file.
use PFT::Content::File; my $f1 = PFT::Content::File->new({ tree => $tree, path => $path, name => $name, # optional, defaults to basename($path) });
This class describes a content file on disk.
Besides the properties following in this section, more are inherited from PFT::Content::Base.
PFT::Content::Base
Absolute path of the file on the filesystem.
Absolute path, encoded with locale
Base name of the file
Last modification time according to the filesystem.
Open a file descriptor for the file:
$f->open # Read file descriptor $f->open($mode) # Open with r|w|a mode
This method does automatic error checking (confessing on error).
Change modification time on the filesytem to current timestamp.
Verify if the file exists
Check if the file is empty
Move the file in the filesystem, update internal data.
To install PFT, copy and paste the appropriate command in to your terminal.
cpanm
cpanm PFT
CPAN shell
perl -MCPAN -e shell install PFT
For more information on module installation, please visit the detailed CPAN module installation guide.