query
On this page

pathIsDirectory

lib.filesystem.pathIsDirectory

Docs pulled from | This Revision | about 2 hours ago


Whether a path exists and is a directory.

Inputs

path

1. Function argument

Type

pathIsDirectory :: Path -> Bool

Examples

lib.filesystem.pathIsDirectory usage example

pathIsDirectory /.
=> true

pathIsDirectory /this/does/not/exist
=> false

pathIsDirectory /some/file.nix
=> false

Noogle detected

Aliases

Implementation

The following is the current implementation of this function.

pathIsDirectory = path:
    pathExists path && pathType path == "directory";