in reply to directory exists
What you have should tell you if something called /mydir is in the root fs. To see if it is a directory call -d.
my $mydir = '/mydir'; if ( -e $mydir and -d _ ) { print $mydir, ' directory exists.', $/; }
The underscore handle makes -d use the cached stat call from -e.
After Compline,
Zaxo
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: directory exists
by ikegami (Patriarch) on Jun 03, 2005 at 02:50 UTC | |
by Fletch (Bishop) on Jun 03, 2005 at 02:53 UTC | |
by Zaxo (Archbishop) on Jun 03, 2005 at 03:19 UTC | |
by ambrus (Abbot) on Jun 03, 2005 at 19:01 UTC | |
|
Re^2: directory exists
by Anonymous Monk on Jun 03, 2005 at 00:26 UTC | |
by Zaxo (Archbishop) on Jun 03, 2005 at 00:47 UTC | |
by tlm (Prior) on Jun 03, 2005 at 00:46 UTC | |
by ambrus (Abbot) on Jun 03, 2005 at 19:09 UTC | |
by Anonymous Monk on Jun 06, 2005 at 02:55 UTC | |
|
Re^2: directory exists
by Anonymous Monk on Jun 03, 2005 at 00:43 UTC |