Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
Loading...
Searching...
No Matches
filepath.cpp
Go to the documentation of this file.
1// Copyright (C) 2022 The Qt Company Ltd.
2// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
3
4#include "filepath.h"
5
6/*!
7 * \class FilePath
8 *
9 * \brief Represents a path to a file that was known to exist on the
10 * filesystem.
11 *
12 * An instance of this type guarantees that, at the time of creation
13 * of the instance, the contained path represented an existing,
14 * readable file.
15 *
16 * The type is intended to be used whenever a user-provided path to a
17 * file is encountered the first time, validating that it can be
18 * used later on for the duration of a QDoc execution and
19 * canonicalizing the original path.
20 *
21 * Such a usage example could be when resolving a file whose path is
22 * provided by the user.
23 *
24 * Similarly, it is intended to be used at the API boundaries,
25 * internally, to relieve the called element of the requirement to
26 * check the validity of a path when a file is required and to
27 * ensure that a single format of the path is encountered.
28 *
29 * Do note that the guarantees provided by this type do not
30 * necessarily hold after the time of creation of an instance.
31 * Indeed, the underlying filesystem may have changed.
32 *
33 * It is possible to renew the contract by obtaining a new instance:
34 *
35 * \code
36 * FilePath old...
37 *
38 * ...
39 *
40 * auto current{FilePath::refine(old.value())};
41 * \endcode
42 *
43 * QDoc itself will not generally perform destructive operations on
44 * its input files during an execution and, as such, it is never
45 * required to renew a contract. Ensuring that the underlying input
46 * files are indeed immutable is out-of-scope for QDoc and it is
47 * allowed to consider a case where the contract was invalidated as
48 * undefined behavior.
49 */
50
51/*!
52 * \include boundaries/refined_typedef_members.qdocinc {wrapped_type_documentation} {FilePath}
53 */
54
55/*!
56 * \include boundaries/refined_typedef_members.qdocinc {has_equality_operator_documentation} {FilePath}
57 */
58
59/*!
60 * \include boundaries/refined_typedef_members.qdocinc {has_less_than_operator_documentation} {FilePath}
61 */
62
63/*!
64 * \include boundaries/refined_typedef_members.qdocinc {has_strictly_less_than_operator_documentation} {FilePath}
65 */
66
67/*!
68 * \include boundaries/refined_typedef_members.qdocinc {has_greater_than_operator_documentation} {FilePath}
69 */
70
71/*!
72 * \include boundaries/refined_typedef_members.qdocinc {has_strictly_greater_than_operator_documentation} {FilePath}
73 */
74
75/*!
76 * \include boundaries/refined_typedef_members.qdocinc {refine_documentation} {FilePath}
77 */
78
79/*!
80 * \include boundaries/refined_typedef_members.qdocinc {value_documentation} {FilePath}
81 */
82
83/*!
84 * \include boundaries/refined_typedef_members.qdocinc {copy_constructor_documentation} {FilePath}
85 */
86
87/*!
88 * \include boundaries/refined_typedef_members.qdocinc {copy_assignment_documentation} {FilePath}
89 */
90
91/*!
92 * \include boundaries/refined_typedef_members.qdocinc {move_constructor_documentation} {FilePath}
93 */
94
95/*!
96 * \include boundaries/refined_typedef_members.qdocinc {move_assignment_documentation} {FilePath}
97 */
98
99/*!
100 * \include boundaries/refined_typedef_members.qdocinc {conversion_documentation} {FilePath}
101 */
102
103/*!
104 * \include boundaries/refined_typedef_members.qdocinc {operator_equal_documentation} {FilePath}
105 */
106
107/*!
108 * \include boundaries/refined_typedef_members.qdocinc {operator_unequal_documentation} {FilePath}
109 */
110
111/*!
112 * \include boundaries/refined_typedef_members.qdocinc {operator_less_than_documentation} {FilePath}
113 */
114
115/*!
116 * \include boundaries/refined_typedef_members.qdocinc {operator_less_than_or_equal_documentation} {FilePath}
117 */
118
119/*!
120 * \include boundaries/refined_typedef_members.qdocinc {operator_greater_than_documentation} {FilePath}
121 */
122
123/*!
124 * \include boundaries/refined_typedef_members.qdocinc {operator_greater_than_or_equal_documentation} {FilePath}
125 */