Previous: File Handlers, Up: Files [Contents][Index]
Since one of the intentions for file handlers is to allow remote files to be accessed, a common method of providing new methods of doing this has been implemented, in the remote.jl Lisp library.
Accessing a file name matching the regular expression:
^/(([a-zA-Z0-9._-]+)@)?([a-zA-Z0-9._-]+):
for example /john@host.com:file refers to a file called ‘file’ owned by the user ‘john’, on the system ‘host.com’.
If no username is specified explicitly, two variables are used to select the user:
An alist mapping host regexps to the default user name to use for remote file connections to that host.
User name to use for remote file connections when otherwise unspecified. By default the current user name on the local system.
Two variables control how individual hosts are matched to methods of accessing files.
An alist of (host-regexp . backend-type) mapping
host names to methods of accessing remote files.
A symbol defining the method to use for otherwise unselected hosts.
A method of accessing files, or a backend is a symbol whose
remote-backend property names a function to call when files need
to be accessed. For example the ftp backend is initialised as:
(put 'ftp 'remote-backend remote-ftp-handler)
The backend function is called as (function
split-name operation args). The split-name is
a three-element list, (user-or-nil host file)
defining the file to be accessed. The other options are as usual.
Further details can be found in the remote.jl,
remote-ftp.jl and remote-rcp.jl Lisp source files.
The ftp backend is currently the most well-developed, several
functions and variables may be used to customise its behaviour.
Add the string passwd as the password for the FTP session connecting to user@host.
When true (the default), messages are displayed as FTP commands are executed.
When true (the default) display progress of FTP transfers.
A regular expression matching the user names for “anonymous” FTP sessions.
The string to send as the passwd of an anonymous FTP session. By default the current uses email address.
There is a problem with the ftp backend however; due to
limitations in the FTP protocol, not all Librep file operations
are supported, with the most obvious exception being the
make-symlink function.
When this is a problem it may be possible to use rep’s custom file
transfer protocol. If it is possible to use rsh to connect to
the remote host in question, then the rep backend may be used.
The rep-remote program distributed with Librep must exist
on the remote host, this is executed via rsh and provides a
protocol for executing all of Librep’s file operations on that
host. See the lisp/remote-rep.jl file in the distribution for
more details.
Previous: File Handlers, Up: Files [Contents][Index]