listFilesRecursive
lib.filesystem.listFilesRecursive
Docs pulled from | This Revision | 43 minutes ago
Given a directory, return a flattened list of all files within it recursively.
Inputs
dir
-
The path to recursively list
Type
Path -> [ Path ]
Noogle detected
Implementation
The following is the current implementation of this function.
listFilesRecursive =
dir:
lib.flatten (lib.mapAttrsToList (name: type:
if type == "directory" then
lib.filesystem.listFilesRecursive (dir + "/${name}")
else
dir + "/${name}"
) (builtins.readDir dir));