[VOTE] Re: directory-handling with nALFS
bookreader at gmx.com
Fri Apr 2 21:53:14 PST 2004
On Friday 02 April 2004 21:52, Kevin P. Fleming wrote:
> James Robertson wrote:
> >> I very like logging too, but that's no reason to raise an error.
> >> In case that the directory has already been created (by a former run)
> >> it's easy to add a log-message telling you about the situation.
> >> So you have your log-entry and the process needs not to fail/stop.
> >> Could that be a compromise?
> > Yes, that would be fine and as you mentioned, make it an option in the
> > rc file.
> The problem I see with this approach is that the DTD does not specify
> exactly what types of paths can be specified to <mkdir>. As it stands
> today, nALFS just passes it along to mkdir via a shell command, so that
> means the path can be anything that the shell would accept.
> To check ahead of time whether the directory already exists requires
> nALFS to do a stat() call on the supplied path, and if the path contains
> shell special characters (globbing or anything else, like ~), this will
> fail and won't be able to tell that the directory already exists.
That's right. But in that case, the mkdir will raise an error, which is the
same behaviour than today (may be need some additional investigation).
Although the benefit seems to be little, I think, it is better than using the
*parents* option, where it is not in the book.
More information about the alfs-discuss