NAME
Zoidberg::Utils::FileRoutines - filesystem routines
DESCRIPTION
This module contains a few routines dealing with files and/or directories. Mainly used to speed up searching $ENV{PATH} by "hashing" the filesystem.
Although when working within the Zoidberg framework this module should be used through the Zoidberg::Utils interface, it also can be used on it's own.
EXPORT
By default none, potentially all functions listed below.
FUNCTIONS
abs_path($file, $reference)-
Returns the absolute path for possible relative
$file$referenceis optional an defaults to$ENV{PWD} get_dir($dir)-
Returns contents of $dir as a hash ref containing : 'files' => [@files], 'dirs' => [@dirs], Array files contains everything that ain't a dir.
list_path()-
Returns a list of all the files found in directories listed in
$ENV{PATH}. Non existing directories in$ENV{PATH}are silently ignored. is_exec_in_path($cmd)-
Returns absolute path if
$cmdexists in a directory listed in$ENV{PATH}and is executable. If$cmdcan't be found or isn't executable undef is returned.
TODO
This module could benefit from using tie().
AUTHOR
R.L. Zwart <rlzwart@cpan.org>
Jaap Karssenberg || Pardus [Larus] <pardus@cpan.org>
Copyright (c) 2003 Jaap G Karssenberg. All rights reserved. This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.