Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Pass an object with various path-related attributes to filter & sort functions #6

Open
jwodder opened this issue Apr 27, 2024 · 0 comments
Labels
breaking change Introduction of an incompatible API change c:filtering

Comments

@jwodder
Copy link
Owner

jwodder commented Apr 27, 2024

Make filter & sort functions take as an argument a single instance of a custom class (named PathInfo?) with the following attributes:

  • entry — the os.DirEntry object
  • path — equal to entry.path converted to a Path
  • name — the entry's basename as a str
  • relpath — the entry's Path relative to dirpath
  • dirpath (root? root_dirpath?) — the original dirpath passed to iterpath()
@jwodder jwodder added breaking change Introduction of an incompatible API change c:filtering labels Apr 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
breaking change Introduction of an incompatible API change c:filtering
Projects
None yet
Development

No branches or pull requests

1 participant