File::Class - Simplifies handling of files in a portable way


NAME

File::Class - Simplifies handling of files in a portable way (Hopefully :-) )


VERSION

This documentation refers to File::Class version 0.1.


SYNOPSIS

   use File::Class;
   # create a new file object
   my $path = File::Class->new( '/home/ivan/bin/' );
   # add a path to the file
   my $file = $path + 'firefox-3';
   # $file = '/home/ivan/bin/firefox-3';
   # get the parent directory
   print $file->up;
   # prints '/home/ivan/bin'


DESCRIPTION


SUBROUTINES/METHODS

new ( $search, )

Param: $search - type (detail) - description

Return: File::Class -

Description:

to_string ()

Return: string - The string version of the file

Description: Stringifies the file.

up ([$num])

Param: $num - int - Number of levels to go up

Return: File::Class - an object of the ancestor directory

Description: Gets the parent/ancestor directory of the current file or directory

add ( $str | $array_ref )

Param: $str - string - A file path to add to the end of the current file

Param: $array_ref - array ref - A list of directories and a file to add to the end of the current file

Return: File::Class - A new file with the extra path added to it.

Description: Adds a path to the current file.

is_dir ()

Return: bool - True if the object represents a directory on the file system

is_file ()

Return: bool - True if the object represents and ordinary file on the file system

does_exist ()

Return: bool - True if the object exists on the file system


DIAGNOSTICS


CONFIGURATION AND ENVIRONMENT


DEPENDENCIES


INCOMPATIBILITIES


BUGS AND LIMITATIONS

There are no known bugs in this module.

Please report problems to Ivan Wills (ivan.wills@gmail.com)

Patches are welcome.


AUTHOR

Ivan Wills - (ivan.wills@gmail.com)


LICENSE AND COPYRIGHT

Copyright (c) 2009 Ivan Wills (14 Mullion Close Hornsby Heights, NSW, Australia 2077). All rights reserved.

This module is free software; you can redistribute it and/or modify it under the same terms as Perl itself. See perlartistic. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

 File::Class - Simplifies handling of files in a portable way