comparison lispref/files.texi @ 52143:3b706f94b559

(Magic File Names): Add file-remote-p. Clarify file-local-copy.
author Richard M. Stallman <rms@gnu.org>
date Wed, 06 Aug 2003 01:28:35 +0000
parents 0509fad02151
children 695cf19ef79e
comparison
equal deleted inserted replaced
52142:187f0047b980 52143:3b706f94b559
2459 handler as its first argument when you call it. The operation is needed 2459 handler as its first argument when you call it. The operation is needed
2460 for comparison with @code{inhibit-file-name-operation}. 2460 for comparison with @code{inhibit-file-name-operation}.
2461 @end defun 2461 @end defun
2462 2462
2463 @defun file-local-copy filename 2463 @defun file-local-copy filename
2464 This function copies file @var{filename} to an ordinary non-magic file, 2464 This function copies file @var{filename} to an ordinary non-magic file
2465 if it isn't one already. 2465 on the local machine, if it isn't on the local machine already. Magic
2466 2466 file names should handle the @code{file-local-copy} operation if they
2467 If @var{filename} specifies a magic file name, which programs 2467 refer to files on other machines. A magic file name that is used for
2468 outside Emacs cannot directly read or write, this copies the contents to 2468 other purposes than remote file access should not handle
2469 an ordinary file and returns that file's name. 2469 @code{file-local-copy}; then this function will treat the file as
2470 2470 local.
2471 If @var{filename} is an ordinary file name, not magic, then this function 2471
2472 does nothing and returns @code{nil}. 2472 If @var{filename} is local, whether magic or not, this function does
2473 nothing and returns @code{nil}. Otherwise it returns the file name
2474 of the local copy file.
2475 @end defun
2476
2477 @defun file-remote-p filename
2478 This functions return @code{t} if @var{filename} is a remote file---that is,
2479 a magic file name that handles @code{file-local-copy}.
2473 @end defun 2480 @end defun
2474 2481
2475 @defun unhandled-file-name-directory filename 2482 @defun unhandled-file-name-directory filename
2476 This function returns the name of a directory that is not magic. It 2483 This function returns the name of a directory that is not magic. It
2477 uses the directory part of @var{filename} if that is not magic. For a 2484 uses the directory part of @var{filename} if that is not magic. For a