query
On this page

pathType

lib.pathType

Primop
Docs pulled from | This Revision | 21 minutes ago

Takes 1 arguments

p


The type of a path. The path needs to exist and be accessible. The result is either "directory" for a directory, "regular" for a regular file, "symlink" for a symlink, or "unknown" for anything else.

Inputs

path

The path to query

Type

pathType :: Path -> String

Examples

lib.filesystem.pathType usage example

pathType /.
=> "directory"

pathType /some/file.nix
=> "regular"
(lib.filesystem.pathType)

Noogle also knows

Aliases