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
DirectoryPath Class Reference

Represents a path to a directory that was known to exist on the filesystem. More...

+ Collaboration diagram for DirectoryPath:

Detailed Description

Represents a path to a directory 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, executable directory.

The type is intended to be used whenever a user-provided path to a directory 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 during the configuration process, when encountering the paths that defines where QDoc should search for images or other files.

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 directory 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:

...
auto current{DirectoryPath:refine(old.value())};
Represents a path to a directory that was known to exist on the filesystem.

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.


The documentation for this class was generated from the following file: