summaryrefslogtreecommitdiff
path: root/devdocs/elisp/file-names.html
blob: a26b19a10f2ea43cf017918d66c1d58a049ef440 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
 <h3 class="section">File Names</h3>  <p>Files are generally referred to by their names, in Emacs as elsewhere. File names in Emacs are represented as strings. The functions that operate on a file all expect a file name argument. </p> <p>In addition to operating on files themselves, Emacs Lisp programs often need to operate on file names; i.e., to take them apart and to use part of a name to construct related file names. This section describes how to manipulate file names. </p> <p>The functions in this section do not actually access files, so they can operate on file names that do not refer to an existing file or directory. </p>     <p>On MS-DOS and MS-Windows, these functions (like the function that actually operate on files) accept MS-DOS or MS-Windows file-name syntax, where backslashes separate the components, as well as POSIX syntax; but they always return POSIX syntax. This enables Lisp programs to specify file names in POSIX syntax and work properly on all systems without change.<a id="DOCF18" href="#FOOT18"><sup>18</sup></a> </p> <table class="menu" border="0" cellspacing="0"> <tr>
<td align="left" valign="top">• <a href="file-name-components" accesskey="1">File Name Components</a>
</td>
<td> </td>
<td align="left" valign="top">The directory part of a file name, and the rest. </td>
</tr> <tr>
<td align="left" valign="top">• <a href="relative-file-names" accesskey="2">Relative File Names</a>
</td>
<td> </td>
<td align="left" valign="top">Some file names are relative to a current directory. </td>
</tr> <tr>
<td align="left" valign="top">• <a href="directory-names" accesskey="3">Directory Names</a>
</td>
<td> </td>
<td align="left" valign="top">A directory’s name as a directory is different from its name as a file. </td>
</tr> <tr>
<td align="left" valign="top">• <a href="file-name-expansion" accesskey="4">File Name Expansion</a>
</td>
<td> </td>
<td align="left" valign="top">Converting relative file names to absolute ones. </td>
</tr> <tr>
<td align="left" valign="top">• <a href="unique-file-names" accesskey="5">Unique File Names</a>
</td>
<td> </td>
<td align="left" valign="top">Generating names for temporary files. </td>
</tr> <tr>
<td align="left" valign="top">• <a href="file-name-completion" accesskey="6">File Name Completion</a>
</td>
<td> </td>
<td align="left" valign="top">Finding the completions for a given file name. </td>
</tr> <tr>
<td align="left" valign="top">• <a href="standard-file-names" accesskey="7">Standard File Names</a>
</td>
<td> </td>
<td align="left" valign="top">If your package uses a fixed file name, how to handle various operating systems simply. </td>
</tr> </table><div class="_attribution">
  <p class="_attribution-p">
    Copyright &copy; 1990-1996, 1998-2022 Free Software Foundation, Inc. <br>Licensed under the GNU GPL license.<br>
    <a href="https://www.gnu.org/software/emacs/manual/html_node/elisp/File-Names.html" class="_attribution-link">https://www.gnu.org/software/emacs/manual/html_node/elisp/File-Names.html</a>
  </p>
</div>