# HG changeset patch # User Kai Grojohann # Date 1088779779 0 # Node ID 904bb1836ccd9db2b55d18280d0fa6ada01c1d62 # Parent 631d0b7593eef364ed56a87e015b43ff9535c29a (Magic File Names): `file-remote-p' returns an identifier of the remote system, not just t. diff -r 631d0b7593ee -r 904bb1836ccd lispref/ChangeLog --- a/lispref/ChangeLog Fri Jul 02 14:49:00 2004 +0000 +++ b/lispref/ChangeLog Fri Jul 02 14:49:39 2004 +0000 @@ -1,3 +1,8 @@ +2004-07-02 Kai Grossjohann + + * files.texi (Magic File Names): `file-remote-p' returns an + identifier of the remote system, not just t. + 2004-07-02 David Kastrup * searching.texi (Entire Match Data): Add explanation about new diff -r 631d0b7593ee -r 904bb1836ccd lispref/files.texi --- a/lispref/files.texi Fri Jul 02 14:49:00 2004 +0000 +++ b/lispref/files.texi Fri Jul 02 14:49:39 2004 +0000 @@ -2646,7 +2646,23 @@ @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