NAME
Parrot::IO::File - File
SYNOPSIS
use Parrot::IO::File;
DESCRIPTION
Use this to query and manipulate files and their contents.
Class Methods
tmp_file($path)
Returns the file for new($path)
Returns the instance for
$path
relative to the default temporary directory.
$path
.Instance Methods
create_path()
This is called from 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.
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. svn_id()
Returns the svn has_svn_id()
Returns whether the file has a svn svn_version()
Returns the svn version number of the file.
is_hidden()
Returns whether the file is "hidden", i.e. it's name starts with a dot.
is_generated()
Returns whether the file is generated.
delete()
Deletes the file, removes the instance from the cache, and undefines it.Raises an exception if the delete fails.
new()
to create the path if necessary.
$contents = $file->read; @lines = $file->read;
$time
is a number of non-leap seconds since the epoch.
$Id
string.
$Id
string.