Document maybeLstat

Co-authored-by: Théophane Hufschmitt <7226587+thufschmitt@users.noreply.github.com>
This commit is contained in:
John Ericson 2024-03-30 10:39:25 -04:00 committed by GitHub
parent 8be347afca
commit 3752bbef28
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -84,6 +84,10 @@ bool isDirOrInDir(std::string_view path, std::string_view dir);
*/
struct stat stat(const Path & path);
struct stat lstat(const Path & path);
/**
* `lstat` the given path if it exists.
* @return std::nullopt if the path doesn't exist, or an optional containing the result of `lstat` otherwise
*/
std::optional<struct stat> maybeLstat(const Path & path);
/**