Bio::Gonzales::Util::File - Utility functions for file stuff
use Bio::Gonzales::Util::File qw(glob_regex expand_path slurpc basename open_on_demand is_newer);
Opens the file if $filename_or_fh
is a filename or returns $filename_or_fh
if it is already a filehandle, that is opened.
Opens the file $filename
and returns an handle to it.
Return true if $b
does not exist or $a
is newer than $b
. Dies if $a
does not exist.
Returns the basename of $file
in scalar context and the ( $dir
, $basename
, $suffix
) in list context. Filename example:
/path/to/file.txt scalar basename: 'file' list basename: ('path/to', 'file', 'txt')
Expands ~ in all supplied files and returns the crap.
Selects files from $dir
based on the supplied $file_regex
.
Splits a $path into directory and filename.
jw bargsten, <joachim.bargsten at wur.nl>