Next: , Previous: http/https, Up: Supported URL Types

4.2 file and ftp

The ftp and file schemes are defined in RFC 1808. The url library treats ‘ftp:’ and ‘file:’ as synonymous. Such URLs have the form


If the URL specifies a local file, it is retrieved by reading the file contents in the usual way. If it specifies a remote file, it is retrieved using either the Tramp or the Ange-FTP package. See Remote Files.

When retrieving a compressed file, it is automatically uncompressed if it has the file suffix .z, .gz, .Z, .bz2, or .xz. (The list of supported suffixes is hard-coded, and cannot be altered by customizing jka-compr-compression-info-list.)

— User Option: url-directory-index-file

This option specifies the filename to look for when a file or ftp URL specifies a directory. The default is index.html. If this file exists and is readable, it is viewed. Otherwise, Emacs visits the directory using Dired.