elisp: Files

 
 24 Files
 ********
 
 This chapter describes the Emacs Lisp functions and variables to find,
 create, view, save, and otherwise work with files and directories.  A
 few other file-related functions are described in SeeBuffers, and
 those related to backups and auto-saving are described in SeeBackups
 and Auto-Saving.
 
    Many of the file functions take one or more arguments that are file
 names.  A file name is a string.  Most of these functions expand file
 name arguments using the function ‘expand-file-name’, so that ‘~’ is
 handled correctly, as are relative file names (including ‘../’).  See
 File Name Expansion.
 
    In addition, certain “magic” file names are handled specially.  For
 example, when a remote file name is specified, Emacs accesses the file
 over the network via an appropriate protocol.  SeeRemote Files
 (emacs)Remote Files.  This handling is done at a very low level, so you
 may assume that all the functions described in this chapter accept magic
 file names as file name arguments, except where noted.  SeeMagic File
 Names, for details.
 
    When file I/O functions signal Lisp errors, they usually use the
 condition ‘file-error’ (SeeHandling Errors).  The error message is
 in most cases obtained from the operating system, according to locale
 ‘system-messages-locale’, and decoded using coding system
 ‘locale-coding-system’ (SeeLocales).
 

Menu