NAME
Parrot::IO::File - File in the Parrot distribution.
SYNOPSIS
use Parrot::IO::File;
my $file = Parrot::IO::File->new('parrot/MANIFEST');
DESCRIPTION
Methods
tmp_file($path)-
Returns the file for
$pathrelative to the default temporary directory. new($path)-
Returns the instance for
$path. create_path()-
This is called from
new()to create the path if necessary. parent($path)-
Returns the file's parent directory.
read()-
This reads the contents of the file and returns it as an array or string depending on the context in which the method is called.
$contents = $file->read; @lines = $file->read; write(@lines)-
Writes the specified lines to the file.
append(@lines)-
Writes the specified lines to the file.
is_executable()-
This tells you whether the file is executable.
modified_since($time)-
Use this to find out whether the file has been modified since the specified time.
$timeis a number of non-leap seconds since the epoch. - cvs_id
-
Returns the CVS $Id string.
- has_cvs_id
-
Returns whether the file has a CVS $Id string.
- cvs_version
-
Returns the CVS version number of the file.
delete()-
Deletes the file, removes the instance from the cache, and undefines it.
Raises an exception if the delete fails.
SEE ALSO
Parrot::IO::Directory, Parrot::IO::Path.