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

cli switch justfiles for displaying just files like find type f #143

Open
wants to merge 6 commits into
base: master
Choose a base branch
from

Conversation

omac777
Copy link

@omac777 omac777 commented Dec 12, 2020

Made is_dir() public because it's useful for filtering out directories when we just want to print out files with their full paths.

For the demo walkdir-list too, I added a new clap switch --justfiles to print out only paths of type file NOT TYPE DIRECTORY. In other words like the find tool -type f
The equivalent of:

find blahdir -type f -print

is:

walkdir-list --justfiles blahdir

or

walkdir-list -j blahdir

@BurntSushi
Copy link
Owner

I guess adding a new CLI flag is fine. But please call it --files.

But exporting a new is_dir method is unnecessary and I don't know why that's included here. You can query it via the file type.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants