mirror of
https://github.com/NixOS/nix.git
synced 2025-11-09 20:16:03 +01:00
Don't change nix::fs for now
This commit is contained in:
parent
02f0294be0
commit
37f4c71d1c
4 changed files with 9 additions and 3 deletions
|
|
@ -126,6 +126,8 @@ std::optional<struct stat> maybeLstat(const Path & path);
|
|||
*/
|
||||
bool pathExists(const Path & path);
|
||||
|
||||
namespace fs {
|
||||
|
||||
/**
|
||||
* ```
|
||||
* symlink_exists(p) = std::filesystem::exists(std::filesystem::symlink_status(p))
|
||||
|
|
@ -139,6 +141,8 @@ inline bool symlink_exists(const std::filesystem::path & path) {
|
|||
return std::filesystem::exists(std::filesystem::symlink_status(path));
|
||||
}
|
||||
|
||||
} // namespace fs
|
||||
|
||||
/**
|
||||
* A version of pathExists that returns false on a permission error.
|
||||
* Useful for inferring default paths across directories that might not
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue