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


NAME

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

Back to Top


VERSION

This documentation refers to File::Class version 0.1.

Back to Top


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'

Back to Top


DESCRIPTION

Back to Top


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

Back to Top


DIAGNOSTICS

Back to Top


CONFIGURATION AND ENVIRONMENT

Back to Top


DEPENDENCIES

Back to Top


INCOMPATIBILITIES

Back to Top


BUGS AND LIMITATIONS

There are no known bugs in this module.

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

Patches are welcome.

Back to Top


AUTHOR

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

Back to Top


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.

Back to Top

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