[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

25. Files

In Emacs, you can find, create, view, save, and otherwise work with files and file directories. This chapter describes most of the file-related functions of Emacs Lisp, but a few others are described in 27. Buffers, and those related to backups and auto-saving are described in 26. Backups and Auto-Saving.

Many of the file functions take one or more arguments that are file names. A file name is actually a string. Most of these functions expand file name arguments by calling expand-file-name, so that `~' is handled correctly, as are relative file names (including `../'). These functions don't recognize environment variable substitutions such as `$HOME'. See section 25.8.4 Functions that Expand Filenames.

When file I/O functions signal Lisp errors, they usually use the condition file-error (see section 10.5.3.3 Writing Code to Handle Errors). The error message is in most cases obtained from the operating system, according to locale system-message-locale, and decoded using coding system locale-coding-system (see section 33.12 Locales).

25.1 Visiting Files  Reading files into Emacs buffers for editing.
25.2 Saving Buffers  Writing changed buffers back into files.
25.3 Reading from Files  Reading files into buffers without visiting.
25.4 Writing to Files  Writing new files from parts of buffers.
25.5 File Locks  Locking and unlocking files, to prevent simultaneous editing by two people.
25.6 Information about Files  Testing existence, accessibility, size of files.
25.7 Changing File Names and Attributes  Renaming files, changing protection, etc.
25.8 File Names  Decomposing and expanding file names.
25.9 Contents of Directories  Getting a list of the files in a directory.
25.10 Creating and Deleting Directories  
25.11 Making Certain File Names "Magic"  Defining "magic" special handling for certain file names.
25.12 File Format Conversion  Conversion to and from various file formats.


[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

This document was generated on May 2, 2002 using texi2html