NAME
App::WRT::FileIO - read and write directories and files
SYNOPSIS
use App::WRT::FileIO;
my $io = App::WRT::FileIO->new();
METHODS
- new($class)
-
Get a new FileIO object.
- is_dir($path)
- is_regular_file($path)
- exists($path)
- dir_list($dir, $sort_order, $pattern)
-
Return a $sort_order sorted list of files matching regex $pattern in a directory.
Calls $sort_order, which can be one of:
alpha - alphabetical reverse_alpha - alphabetical, reversed high_to_low - numeric, high to low low_to_high - numeric, low to high
- file_put_contents($file, $contents)
-
Write $contents string to $file path. Because:
https://secure.php.net/manual/en/function.file-put-contents.php
- file_get_contents($file)
-
Get contents string of $file path. Because:
https://secure.php.net/manual/en/function.file-get-contents.php
- file_copy($source, $dest)
- dir_make($source, $dest)