Skip to content

Commit

Permalink
Document maybeLstat
Browse files Browse the repository at this point in the history
Co-authored-by: Théophane Hufschmitt <7226587+thufschmitt@users.noreply.github.com>
(cherry picked from commit 3752bbe)
(cherry picked from commit 41d60b5)
  • Loading branch information
Ericson2314 committed Apr 11, 2024
1 parent 7a3d257 commit a9caeb7
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/libutil/file-system.hh
Original file line number Diff line number Diff line change
Expand Up @@ -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);

/**
Expand Down

0 comments on commit a9caeb7

Please sign in to comment.