blob: b154b0e7f6dbf06630a6a7a086913d32d090b372 (
plain)
1
2
3
4
5
|
{ lib, ... }:
{ path, suffix ? null, type ? "regular" }:
(builtins.filter (n: suffix == null || (builtins.match ".*\\.${suffix}" n) != null)
(lib.attrNames
(lib.filterAttrs (n: v: v == type) (builtins.readDir path))))
|