mrdocs::getSinglePageFullPath
Return the full path for single page output.
Synopsis
Declared in <mrdocs/Generator.hpp>
Expected<std::string>
getSinglePageFullPath(
std::string_view outputPath,
std::string_view extension);
Description
This function determines the full path for a single‐page output file based on the provided outputPath and file extension.
If the outputPath already exists:
-
If it is a directory, appends the default file name with the provided extension.
-
If it is a file, uses the provided
outputPathdirectly.
If the outputPath does not exist:
-
If it ends with a '/', assumes it is a directory and appends the default file name.
-
Otherwise, it returns an error because the path is ambiguous.
Parameters
| Name | Description |
|---|---|
outputPath |
The specified output path, which can be a directory or file. |
extension |
The file extension to use for single‐page output. |
Created with MrDocs