Skip to content

Commit

Permalink
lib.filesystem.pathType: Mention builtins.readFileType
Browse files Browse the repository at this point in the history
  • Loading branch information
infinisil committed Apr 5, 2023
1 parent 4604f67 commit 85f7a5c
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions lib/filesystem.nix
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,8 @@ in
=> "regular"
*/
pathType = path:
# TODO: Once Nix 2.14 is released, switch to `builtins.readFileType`:
# https://nixos.org/manual/nix/unstable/language/builtins.html#builtins-readFileType
if ! pathExists path
then throw "lib.filesystem.pathType: Path ${toString path} does not exist."
# The filesystem root is the only path where `dirOf / == /` and
Expand Down

0 comments on commit 85f7a5c

Please sign in to comment.