-
-
Notifications
You must be signed in to change notification settings - Fork 18.5k
lib.fileset.fileFilter should allow filtering by file subpath/components #269504
Copy link
Copy link
Open
Labels
2.status: stalehttps://github.com/NixOS/nixpkgs/blob/master/.github/STALE-BOT.mdhttps://github.com/NixOS/nixpkgs/blob/master/.github/STALE-BOT.md
Description
Issue description
Currently the predicate of lib.fileset.fileFilter only gets name, type (and soon hasExt).
There's no way to filter by the subpath/components of the file, something like this:
lib.fileset.fileFilter (file:
lib.lists.hasSuffix [ "foo" "bar" ] file.components
) ./.(hasSuffix currently also doesn't exist)
Some ideas:
file.components :: [ String ]: File components, always at least one element for the file's namefile.subpath :: String: The file's subpathfile.dirComponents :: [ String ]: Directory components, can be empty for files in the root levelfile.dirSubpath :: String: Directory subpath, can be./.for files in the root level
This feature request is the motivation behind #267384.
This issue is sponsored by Antithesis ✨
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
2.status: stalehttps://github.com/NixOS/nixpkgs/blob/master/.github/STALE-BOT.mdhttps://github.com/NixOS/nixpkgs/blob/master/.github/STALE-BOT.md
Fields
Give feedbackNo fields configured for issues without a type.
Projects
Status
No status