Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
|
Represents a path to a file that was known to exist on the filesystem. More...
Represents a path to a file that was known to exist on the filesystem.
An instance of this type guarantees that, at the time of creation of the instance, the contained path represented an existing, readable file.
The type is intended to be used whenever a user-provided path to a file is encountered the first time, validating that it can be used later on for the duration of a QDoc execution and canonicalizing the original path.
Such a usage example could be when resolving a file whose path is provided by the user.
Similarly, it is intended to be used at the API boundaries, internally, to relieve the called element of the requirement to check the validity of a path when a file is required and to ensure that a single format of the path is encountered.
Do note that the guarantees provided by this type do not necessarily hold after the time of creation of an instance. Indeed, the underlying filesystem may have changed.
It is possible to renew the contract by obtaining a new instance:
QDoc itself will not generally perform destructive operations on its input files during an execution and, as such, it is never required to renew a contract. Ensuring that the underlying input files are indeed immutable is out-of-scope for QDoc and it is allowed to consider a case where the contract was invalidated as undefined behavior.