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
file
role; about theprogram
role in Semantic Descriptions and References, and about thecommand
role 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/bash
orbash
– but better is bash/usr/local/bin/myapp
– but better is myappfilename.txt
/path/filename.txt
/path/subdir/
(ends with a/
)..\MyApp\core.conf
C:\ProgramData\MyApp\core.conf
C:\ProgramData\MyApp\
(ends with a\
)/usr/share/man/manN
(ends with a variable mark, N = 1..9)