Mercurial > emacs
comparison lispref/files.texi @ 81940:9c550f0c81fa
* files.texi (Magic File Names): Introduce optional parameter
IDENTIFICATION for `file-remote-p'.
author | Michael Albinus <michael.albinus@gmx.de> |
---|---|
date | Tue, 17 Jul 2007 21:29:20 +0000 |
parents | 665f8d0fb99f |
children | a1be62cbd32a |
comparison
equal
deleted
inserted
replaced
81939:7cd8ee60cf68 | 81940:9c550f0c81fa |
---|---|
2766 If @var{filename} is local, whether magic or not, this function does | 2766 If @var{filename} is local, whether magic or not, this function does |
2767 nothing and returns @code{nil}. Otherwise it returns the file name | 2767 nothing and returns @code{nil}. Otherwise it returns the file name |
2768 of the local copy file. | 2768 of the local copy file. |
2769 @end defun | 2769 @end defun |
2770 | 2770 |
2771 @defun file-remote-p filename &optional connected | 2771 @defun file-remote-p filename &optional identification connected |
2772 This function tests whether @var{filename} is a remote file. If | 2772 This function tests whether @var{filename} is a remote file. If |
2773 @var{filename} is local (not remote), the return value is @code{nil}. | 2773 @var{filename} is local (not remote), the return value is @code{nil}. |
2774 If @var{filename} is indeed remote, the return value is a string that | 2774 If @var{filename} is indeed remote, the return value is a string that |
2775 identifies the remote system. | 2775 identifies the remote system. |
2776 | 2776 |
2783 filenames, that means they are stored on the same file system and can | 2783 filenames, that means they are stored on the same file system and can |
2784 be accessed locally with respect to each other. This means, for | 2784 be accessed locally with respect to each other. This means, for |
2785 example, that it is possible to start a remote process accessing both | 2785 example, that it is possible to start a remote process accessing both |
2786 files at the same time. Implementors of file handlers need to ensure | 2786 files at the same time. Implementors of file handlers need to ensure |
2787 this principle is valid. | 2787 this principle is valid. |
2788 | |
2789 @var{identification} specifies which part of the identifier shall be | |
2790 returned as string. @var{identification} can be the symbol | |
2791 @code{method}, @code{user} or @code{host}; any other value is handled | |
2792 like @code{nil} and means to return the complete identifier string. | |
2793 In the example above, the remote @code{user} identifier string would | |
2794 be @code{root}. | |
2788 | 2795 |
2789 If @var{connected} is non-@code{nil}, this function returns @code{nil} | 2796 If @var{connected} is non-@code{nil}, this function returns @code{nil} |
2790 even if @var{filename} is remote, if Emacs has no network connection | 2797 even if @var{filename} is remote, if Emacs has no network connection |
2791 to its host. This is useful when you want to avoid the delay of | 2798 to its host. This is useful when you want to avoid the delay of |
2792 making connections when they don't exist. | 2799 making connections when they don't exist. |