aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRichard M. Stallman2003-06-24 18:16:37 +0000
committerRichard M. Stallman2003-06-24 18:16:37 +0000
commit8632c4f0e64d080948f681b65a857a40951c325f (patch)
tree227aa004fd15c3c1568c356faba02fc013b7212a
parent583abbac8854840d0160a0e604eff4fd67b6bcb9 (diff)
downloademacs-8632c4f0e64d080948f681b65a857a40951c325f.tar.gz
emacs-8632c4f0e64d080948f681b65a857a40951c325f.zip
Fix minor Texinfo usage.
(file-exists-p): Explain handling of directories, symlinks, etc.
-rw-r--r--lispref/files.texi18
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
720This function returns @code{t} if a file named @var{filename} appears to 720This function returns @code{t} if a file named @var{filename} appears
721exist. This does not mean you can necessarily read the file, only that 721to exist. This does not mean you can necessarily read the file, only
722you can find out its attributes. (On Unix and GNU/Linux, this is true 722that you can find out its attributes. (On Unix and GNU/Linux, this is
723if the file exists and you have execute permission on the containing 723true if the file exists and you have execute permission on the
724directories, regardless of the protection of the file itself.) 724containing directories, regardless of the protection of the file
725itself.)
725 726
726If the file does not exist, or if fascist access control policies 727If the file does not exist, or if fascist access control policies
727prevent you from finding the attributes of the file, this function 728prevent you from finding the attributes of the file, this function
728returns @code{nil}. 729returns @code{nil}.
730
731Directories are files, so @code{file-exists-p} returns @code{t} when
732given a directory name. However, symbolic links are treated
733specially; @code{file-exists-p} returns @code{t} for a symbolic link
734name 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}.
1476This function returns @var{filename}'s final ``extension,'' if any, 1482This function returns @var{filename}'s final ``extension,'' if any,
1477after applying @code{file-name-sans-versions} to remove any 1483after applying @code{file-name-sans-versions} to remove any
1478version/backup part. It returns @code{nil} for extensionless file 1484version/backup part. It returns @code{nil} for extensionless file
1479names such as @file{foo}. If @var{period} is non-nil, then the 1485names such as @file{foo}. If @var{period} is non-@code{nil}, then the
1480returned value includes the period that delimits the extension, and if 1486returned 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
1482component of a file name begins with a @samp{.}, that @samp{.} doesn't 1488component of a file name begins with a @samp{.}, that @samp{.} doesn't