diff options
author | tv <tv@shackspace.de> | 2015-10-15 00:59:00 +0200 |
---|---|---|
committer | tv <tv@shackspace.de> | 2015-10-15 01:01:45 +0200 |
commit | 3a375d843ec4a6828673597810101923619a3e94 (patch) | |
tree | 055e80c680d2f50604f7cee9675815320b692886 /krebs/4lib | |
parent | 35dd3df5c6276dace7bfbd755a72a6122ecf5ae3 (diff) |
krebs lib: init subdirsOf
Diffstat (limited to 'krebs/4lib')
-rw-r--r-- | krebs/4lib/default.nix | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/krebs/4lib/default.nix b/krebs/4lib/default.nix index f83be9ff8..78f719988 100644 --- a/krebs/4lib/default.nix +++ b/krebs/4lib/default.nix @@ -24,4 +24,8 @@ builtins // lib // rec { null = "NULL"; string = toJSON x; # close enough }.${typeOf x}; + + subdirsOf = path: + mapAttrs (name: _: path + "/${name}") + (filterAttrs (_: eq "directory") (readDir path)); } |