Skip to content

Provide an exclude counterpart of include for ls. #5

@BigRoy

Description

@BigRoy

Goal

Currently ls offers an include argument to filter towards a subset as it queries the file system. A similar optimization could be put in place to exclude specific subsets.

Example

To exclude the 'review' family.

ls("{family}/{data}", exclude={"family": "review"})

Implementation

Unfortunately glob doesn't offer a negated pattern by default so this would mean we'd have to override glob's behavior. In short, this would mean to implement our own globbing method. Fortunately it's a relatively light-weight implementation that's easy to expand upon to add the negated behavior.

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions