Alex, how does this look?
I want to make sure that /editors/profiles exists before I continue with a part of my code:
The user may not have /editors or /editors/profiles.....
#Generate the /editors/profiles directory if it does not already exists
#-------
my $path = "/editors/profiles";
&build_directories ($path);
then further down:
sub build_directories {
#make sure directory exists, including parent directories, if not then create them
my $path = shift;
my $dir = "$CFG->{build_root_path}/$path";
unless (-e "$dir") {
mkdir ($dir, 0777) or die "mkdir: $dir ($!)";
chmod(0777, $dir) or die "chmod: $dir ($!)";
}
}
This is getting complex, to just make sure some directories exist before writing files to them
http://www.iuni.com/...tware/web/index.html Links Plugins