[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Documentation of file-exists-p in the elisp manual could be bette
Re: Documentation of file-exists-p in the elisp manual could be better...
Thu, 05 Jun 2003 15:05:20 -0600
Mozilla/5.0 (X11; U; SunOS i86pc; en-US; rv:0.9.4.1) Gecko/20020406 Netscape6/6.2.2
Dan Katz wrote:
I went looking for a way to find out if a directory existed, and ended
up using file-exists-p. Looking at the elisp manual, however, did not
make it clear whether this was the correct approach or whether it was
"working by accident." In particular, the elisp manual description of
file-exists-p was not really clear whether (or how) this function
would (or should) work for directories, sym-links, etc. While it
seems to basically "do the right thing", I suggest that the
documentation needs to be a bit more explicit about notions of
"generalized" files and how the file-handling functions apply.
The docstring for file-exists-p was not much use in this regard,
although it's link to file-attributes is what led me to suspect that
file-exists-p might be the correct approach for directories as well.
That's a rather indirect hint, however.
What is unclear about this:
| file-directory-p is a built-in function.
| (file-directory-p FILENAME)
| Return t if FILENAME names an existing directory.
| Symbolic links to directories count as directories.
| See `file-symlink-p' to distinguish symlinks.
<a href="mailto:<email@example.com>">Kevin Rodgers</a>
|[Prev in Thread]
||[Next in Thread]|
- Re: Documentation of file-exists-p in the elisp manual could be better...,
Kevin Rodgers <=