Re: How to determine if a directory is a subdirectory of another directory?
- From: "Gerald W. Lester" <Gerald.Lester@xxxxxxx>
- Date: Wed, 26 Nov 2008 09:26:24 -0600
Arjen Markus wrote:
...
A quick check does indeed show that with symlinks the discussed
algorithm fails miserably (that is: [file normalize] does not
return the name of the file being linked to, so you end up with
two different names for the same thing).
The usecase I have in mind should not be this involved, but it
would be nice to crush this problem before it really becomes
a problem.
Appropriate use of [file type] and [file link] (or [catch] and [file link]) as well as normalize will get you the "true" absolute paths to the source and destination.
That being said, in the subdirectories of either could be links to elsewhere in the tree.
--
+------------------------------------------------------------------------+
| Gerald W. Lester |
|"The man who fights for his ideals is the man who is alive." - Cervantes|
+------------------------------------------------------------------------+
.
- Follow-Ups:
- Re: How to determine if a directory is a subdirectory of another directory?
- From: Andreas Leitgeb
- Re: How to determine if a directory is a subdirectory of another directory?
- References:
- How to determine if a directory is a subdirectory of another directory?
- From: Arjen Markus
- Re: How to determine if a directory is a subdirectory of another directory?
- From: Andreas Leitgeb
- Re: How to determine if a directory is a subdirectory of another directory?
- From: Arjen Markus
- How to determine if a directory is a subdirectory of another directory?
- Prev by Date: Re: How to determine if a directory is a subdirectory of another directory?
- Next by Date: removing part of lines that start with curly brace
- Previous by thread: Re: How to determine if a directory is a subdirectory of another directory?
- Next by thread: Re: How to determine if a directory is a subdirectory of another directory?
- Index(es):