query
On this page

pathIsRegularFile

lib.pathIsRegularFile

Docs pulled from | This Revision | 34 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
(lib.filesystem.pathIsRegularFile)

Noogle detected

Aliases

Implementation

The following is the current implementation of this function.

pathIsRegularFile = path:
    pathExists path && pathType path == "regular";