pathIsRegularFile
lib.sources.pathIsRegularFile
Docs pulled from | This Revision | 35 minutes ago
Whether a path exists and is a regular file, meaning not a symlink or any other special file type.
Inputs
path
-
1. Function argument
Type
pathIsRegularFile :: Path -> Bool
Examples
lib.filesystem.pathIsRegularFile
usage example
pathIsRegularFile /.
=> false
pathIsRegularFile /this/does/not/exist
=> false
pathIsRegularFile /some/file.nix
=> true
Noogle detected
Implementation
The following is the current implementation of this function.
pathIsRegularFile = path:
pathExists path && pathType path == "regular";