File: path.yo

package info (click to toggle)
c%2B%2B-annotations 12.2.0-2
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 13,044 kB
  • sloc: cpp: 24,337; makefile: 1,517; ansic: 165; sh: 121; perl: 90
file content (47 lines) | stat: -rw-r--r-- 2,031 bytes parent folder | download
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
42
43
44
45
46
47
Objects of the class tt(filesysten::path)hi(path) hold names of file
system entries. The class tt(path) is a value class: a default
constructor (empty path) as well as standard copy/move construction/assignment
facilities are available. In addition, the following constructors can be used:
    itemization(
    itt(path(string &&tmp));
    itt(path(Type const &source)):nl() 
       any acceptable type that provides the characters of the path (e.g.,
        tt(source) is a NTBS);
    itt(path(InputIter begin, InputIter end)):nl()
       the characters from tt(begin) to tt(end) define the tt(path's) name.
    )
    A thus constructed tt(path) doesn't have to refer to an existing file
system entry.

    Path constructors expect character sequences (including NTBSs) that may
consist of various (all optional) elements:
    itemization(
    it() a root-name, e.g., a disk-name (like tt(E:)) or device indicator
        (like tt(//nfs));
    it() a root-directory, present if it is the first character after
        the (optional) root-name;
    it() filename characters (not containing directory separators). In
        addition the `single dot filename' (tt(.)) represents the current
        directory and the `double dot filename' (tt(..)) represents the
        current directory's parent directory;
    it() directory separators (by default the forward slash). Multiple
        consecutive separators are automatically merged into one separator.
    )

    The constructors also define a last tt(format ftmp = auto_format)
parameter, for which in practice almost never an argument has to be provided
(for its details see url(cppreference)
        (http://en.cppreference.com/w/cpp/experimental/fs/path).)

    Many functions expect tt(path) arguments which can usually be created from
NTBSs or tt(std::string) objects as tt(path) allows promotions (cf. section
ref(EXPLICIT)). E.g., the filesystem function tt(absolute) expects a tt(const
&path) argument. It can be called like this: tt(absolute("tmp/filename")).