mirror of
https://github.com/NixOS/nix.git
synced 2024-11-21 22:32:26 +00:00
Document maybeLstat
Co-authored-by: Théophane Hufschmitt <7226587+thufschmitt@users.noreply.github.com>
(cherry picked from commit 3752bbef28
)
This commit is contained in:
parent
e75690ba1e
commit
41d60b544b
@ -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);
|
||||
|
||||
/**
|
||||
|
Loading…
Reference in New Issue
Block a user