diff options
| author | Richard M. Stallman | 2003-06-24 18:16:37 +0000 |
|---|---|---|
| committer | Richard M. Stallman | 2003-06-24 18:16:37 +0000 |
| commit | 8632c4f0e64d080948f681b65a857a40951c325f (patch) | |
| tree | 227aa004fd15c3c1568c356faba02fc013b7212a | |
| parent | 583abbac8854840d0160a0e604eff4fd67b6bcb9 (diff) | |
| download | emacs-8632c4f0e64d080948f681b65a857a40951c325f.tar.gz emacs-8632c4f0e64d080948f681b65a857a40951c325f.zip | |
Fix minor Texinfo usage.
(file-exists-p): Explain handling of directories, symlinks, etc.
| -rw-r--r-- | lispref/files.texi | 18 |
1 files changed, 12 insertions, 6 deletions
diff --git a/lispref/files.texi b/lispref/files.texi index 0c66a3602e4..b568656e4ce 100644 --- a/lispref/files.texi +++ b/lispref/files.texi | |||
| @@ -717,15 +717,21 @@ or directories unless otherwise noted. | |||
| 717 | These functions test for permission to access a file in specific ways. | 717 | These functions test for permission to access a file in specific ways. |
| 718 | 718 | ||
| 719 | @defun file-exists-p filename | 719 | @defun file-exists-p filename |
| 720 | This function returns @code{t} if a file named @var{filename} appears to | 720 | This function returns @code{t} if a file named @var{filename} appears |
| 721 | exist. This does not mean you can necessarily read the file, only that | 721 | to exist. This does not mean you can necessarily read the file, only |
| 722 | you can find out its attributes. (On Unix and GNU/Linux, this is true | 722 | that you can find out its attributes. (On Unix and GNU/Linux, this is |
| 723 | if the file exists and you have execute permission on the containing | 723 | true if the file exists and you have execute permission on the |
| 724 | directories, regardless of the protection of the file itself.) | 724 | containing directories, regardless of the protection of the file |
| 725 | itself.) | ||
| 725 | 726 | ||
| 726 | If the file does not exist, or if fascist access control policies | 727 | If the file does not exist, or if fascist access control policies |
| 727 | prevent you from finding the attributes of the file, this function | 728 | prevent you from finding the attributes of the file, this function |
| 728 | returns @code{nil}. | 729 | returns @code{nil}. |
| 730 | |||
| 731 | Directories are files, so @code{file-exists-p} returns @code{t} when | ||
| 732 | given a directory name. However, symbolic links are treated | ||
| 733 | specially; @code{file-exists-p} returns @code{t} for a symbolic link | ||
| 734 | name only if the target file exists. | ||
| 729 | @end defun | 735 | @end defun |
| 730 | 736 | ||
| 731 | @defun file-readable-p filename | 737 | @defun file-readable-p filename |
| @@ -1476,7 +1482,7 @@ This function returns the nondirectory part of @var{filename}. | |||
| 1476 | This function returns @var{filename}'s final ``extension,'' if any, | 1482 | This function returns @var{filename}'s final ``extension,'' if any, |
| 1477 | after applying @code{file-name-sans-versions} to remove any | 1483 | after applying @code{file-name-sans-versions} to remove any |
| 1478 | version/backup part. It returns @code{nil} for extensionless file | 1484 | version/backup part. It returns @code{nil} for extensionless file |
| 1479 | names such as @file{foo}. If @var{period} is non-nil, then the | 1485 | names such as @file{foo}. If @var{period} is non-@code{nil}, then the |
| 1480 | returned value includes the period that delimits the extension, and if | 1486 | returned value includes the period that delimits the extension, and if |
| 1481 | @var{filename} has no extension, the value is @code{""}. If the last | 1487 | @var{filename} has no extension, the value is @code{""}. If the last |
| 1482 | component of a file name begins with a @samp{.}, that @samp{.} doesn't | 1488 | component of a file name begins with a @samp{.}, that @samp{.} doesn't |