1.7. File, Directory, Path¶
File and directories (or generally paths) are formated by :file:
inline markup. Backslashes (Windows paths) \ have to written as \\.
The name of an executable program should be documented by :program:
inline markup. This may differ from the file name for the executable for
some platforms. In particular, the .exe (or other) extension should
be omitted for Windows programs. For OS-level command use :command:
inline markup.
-
:file:¶ For more details, see
filerole; about theprogramrole in Semantic Descriptions and References, and about thecommandrole in Writing about User Interface.- The example
1 2 3 4 5 6 7 8 9 10 11 12
| :file:`/bin/bash` or :file:`bash` -- but better is :command:`bash` | :file:`/usr/local/bin/myapp` -- but better is :program:`myapp` | :file:`filename.txt` | :file:`/path/filename.txt` | :file:`/path/subdir/` (ends with a ``/``) | :file:`..\\MyApp\\core.conf` | :file:`C:\\ProgramData\\MyApp\\core.conf` | :file:`C:\\ProgramData\\MyApp\\` (ends with a ``\``) | :file:`/usr/share/man/man{N}` (ends with a variable mark, *N* = 1..9)
- Which gives
/bin/bashorbash– but better is bash/usr/local/bin/myapp– but better is myappfilename.txt/path/filename.txt/path/subdir/(ends with a/)..\MyApp\core.confC:\ProgramData\MyApp\core.confC:\ProgramData\MyApp\(ends with a\)/usr/share/man/manN(ends with a variable mark, N = 1..9)