comparison lispref/files.texi @ 56321:904bb1836ccd

(Magic File Names): `file-remote-p' returns an identifier of the remote system, not just t.
author Kai Großjohann <kgrossjo@eu.uu.net>
date Fri, 02 Jul 2004 14:49:39 +0000
parents 6d7412bcd051
children f597c982349e
comparison
equal deleted inserted replaced
56320:631d0b7593ee 56321:904bb1836ccd
2644 nothing and returns @code{nil}. Otherwise it returns the file name 2644 nothing and returns @code{nil}. Otherwise it returns the file name
2645 of the local copy file. 2645 of the local copy file.
2646 @end defun 2646 @end defun
2647 2647
2648 @defun file-remote-p filename 2648 @defun file-remote-p filename
2649 This function returns @code{t} if @var{filename} is a remote file. 2649 This function tests whether @var{filename} is a remote file. The
2650 return value is an identifier of the remote system, if @var{filename}
2651 is indeed remote. Besides the host name, the identifier may comprise
2652 a user name and a method used to access that system.
2653
2654 To illustrate, for the filename @code{/ssh:user@@host:/some/file}, the
2655 identifier is @code{/ssh:user@@host:}.
2656
2657 If @var{filename} is local (not remote), then the return value is
2658 @code{nil}.
2659
2660 If @code{file-remote-p} returns the same identifier for two different
2661 filenames, then the file handler is the same, and also the files can
2662 be accessed locally with respect to each other. This means, for
2663 example, that it is possible to start a (remote) process accessing
2664 both files at the same time. Implementors of file handlers need to
2665 ensure this.
2650 @end defun 2666 @end defun
2651 2667
2652 @defun unhandled-file-name-directory filename 2668 @defun unhandled-file-name-directory filename
2653 This function returns the name of a directory that is not magic. It 2669 This function returns the name of a directory that is not magic. It
2654 uses the directory part of @var{filename} if that is not magic. For a 2670 uses the directory part of @var{filename} if that is not magic. For a