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
os.listdir-alike that includes file type #37269
Comments
I propose to add two new functions, say os.listdirtypes Filetype would indicate wether the entry was a file, listdirtypes would be equivalent to using stat, ie. An app I'm working on right now that reads in a |
Logged In: YES I'm in favour of exposing more information received from I don't think listdir should perform stat calls itself; if What is the proposed difference between listdirtypes and On the return type of the "verbose" listdir, I think it This should extend to other systems as well. E.g. on There should also be a way to use this with os.path.walk. So, in short, I'm in favour of this idea. Would you |
Logged In: YES Adding a flag to the existing listdir as opposed to adding There are two reasons I suggest adding the stat calls in The second is from a usability point of view. If listdir Perhaps the d_type field could be returned verbatim, but a The difference between listdirtypes and llistdirtypes is As for os.path.walk, a flag could be added to that which Sure, I'll volunteer. I'll start reading up on the PEP process. |
No activity for long time. |
Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.
Show more details
GitHub fields:
bugs.python.org fields:
The text was updated successfully, but these errors were encountered: