3.5.0-rc1
Loading...
Searching...
No Matches
tiglexternalfilehelpers.h File Reference
#include <string>
#include "tigl_internal.h"

Functions

TIGL_EXPORT void CheckFileIsReadable (const std::string &filePath)
 Checks whether a file path points to a readable file.
TIGL_EXPORT std::string ResolveFilePath (const std::string &baseFilePath, const std::string &filePath)
 Resolves a file path relative to a base file.

Function Documentation

◆ CheckFileIsReadable()

TIGL_EXPORT void CheckFileIsReadable ( const std::string & filePath)

Checks whether a file path points to a readable file.

This function does not resolve or modify the path. It returns normally if filePath is readable as given.

Parameters
filePathFile path to check.
Exceptions
tigl::CTiglErrorwith TIGL_OPEN_FAILED if the file is not readable.

◆ ResolveFilePath()

TIGL_EXPORT std::string ResolveFilePath ( const std::string & baseFilePath,
const std::string & filePath )

Resolves a file path relative to a base file.

Relative paths are interpreted relative to the directory of baseFilePath. Absolute paths are returned unchanged.

Parameters
baseFilePathPath to the file whose directory is used as base.
filePathAbsolute or relative file path to resolve.
Returns
The resolved file path.