summaryrefslogtreecommitdiff
path: root/lispref/files.texi
diff options
context:
space:
mode:
authorKai Großjohann <kgrossjo@eu.uu.net>2004-07-02 14:49:39 +0000
committerKai Großjohann <kgrossjo@eu.uu.net>2004-07-02 14:49:39 +0000
commit8addb6ebbaecbad78010d66475d6ae5418cb0416 (patch)
tree4815a0e93189605d37d9bf087a50d663ecb3a3e2 /lispref/files.texi
parent5fe536b81b3f41fba656b191e0c5c0e5439cc8ae (diff)
downloademacs-8addb6ebbaecbad78010d66475d6ae5418cb0416.tar.gz
(Magic File Names): `file-remote-p' returns an identifier of the
remote system, not just t.
Diffstat (limited to 'lispref/files.texi')
-rw-r--r--lispref/files.texi18
1 files changed, 17 insertions, 1 deletions
diff --git a/lispref/files.texi b/lispref/files.texi
index 10d6c808625..3fb9460da8a 100644
--- a/lispref/files.texi
+++ b/lispref/files.texi
@@ -2646,7 +2646,23 @@ of the local copy file.
@end defun
@defun file-remote-p filename
-This function returns @code{t} if @var{filename} is a remote file.
+This function tests whether @var{filename} is a remote file. The
+return value is an identifier of the remote system, if @var{filename}
+is indeed remote. Besides the host name, the identifier may comprise
+a user name and a method used to access that system.
+
+To illustrate, for the filename @code{/ssh:user@@host:/some/file}, the
+identifier is @code{/ssh:user@@host:}.
+
+If @var{filename} is local (not remote), then the return value is
+@code{nil}.
+
+If @code{file-remote-p} returns the same identifier for two different
+filenames, then the file handler is the same, and also the files can
+be accessed locally with respect to each other. This means, for
+example, that it is possible to start a (remote) process accessing
+both files at the same time. Implementors of file handlers need to
+ensure this.
@end defun
@defun unhandled-file-name-directory filename