[Dirvish] Creating Backups with image-default: %Y%m%d/%Y%m%d-%H_%M

Arno Wald arno.wald at netcologne.de
Thu Aug 23 06:55:36 UTC 2007

Keith Lofstrom wrote:

> I will ask the local perlmonger's group if there is a good way to 
> replace the "mkdir" in the dirvish script with something that will do
> "mkdir -p" properly, and that can go into a patch of dirvish, and a
> future version of dirvish if enough dirvish users want to participate
> to make that happen.

mkdir -p can be done via:

use File::Path;
#perhaps it might be interesting to first change the umask?
#umask 0000;
my @created_paths = mkpath( $path, 0, 0775 );

die "could not create path '$path'" if @created_paths == 0;

If you have perldoc installed you can read about this module in the 
perldoc File::Path


More information about the Dirvish mailing list