parrotcode: Directory | |
Contents | Perl Modules |
Parrot::IO::Directory - Directory
use Parrot::IO::Directory;
Use this to query and manipulate directories and their contents.
directory_class()
Parrot::IO::Directory
.
file_class()
Parrot::IO::File
.
directory_with_path($path)
directory_class
.
file_with_path($path)
file_class
.
tmp_directory($path)
$path
relative to the default temporary directory.
new($path)
create_path()
new()
to create the path if necessary.
relative_path($directory)
relative_path($file)
relative_path($path)
parent()
undef
.
file_and_directory_names()
file_and_directory_paths()
file_paths()
directory_paths()
file_exists_with_name($name)
directory_exists_with_name($name)
files($recursive, $ignore)
Parrot::IO::File
instances.Set $recursive
to true if you want all files in subdirectories to be included. To ignore everything below particular directories use a regex in $ignore
.
directories()
file_suffixes($recursive, $ignore)
$recursive
and $ignore
function as specified above for files()
.For example:
$parrot->file_suffixes(1, '^(SVN|icu)$');will give you all the suffixes used in Parrot ignoring all SVN and ICU files.Note that if there are files with no suffix then the empty string will be included in this list.
files_with_suffix($suffix, $recursive, $ignore)
$recursive
and $ignore
function as specified above for files()
.Note that if $suffix
is the empty string then this will return all the files with no suffix.
path_for_directory_with_name($name)
path_for_file_with_name($name)
directory_with_name($name)
file_with_name($name)
existing_directory_with_name($name)
existing_file_with_name($name)
path_for_directory_with_relative_path($path)
path_for_file_with_relative_path($path)
relative_path_is_directory($path)
relative_path_is_file($path)
directory_with_relative_path($path)
file_with_relative_path($path)
delete()
delete_contents()
|