Cross-platform module that creates directory object with all file attributes

python at bdurham.com python at bdurham.com
Tue Jul 13 11:56:46 EDT 2010


Any recommendations for a cross-platform module that creates a
directory object with not only file names, but file attributes as
well?

Use cases:
- Sort files by file size or date last modified
- Filter files by read-only status

I know I can use various standard library functions [1] to
construct such a class, but I'd rather avoid re-inventing the
wheel if at all possible. (I fear that this may be one of those
seemingly easy tasks that starts off simple and ends up taking a
lot more time to implement after real world refactoring).

Malcolm

[1] os.path.getmtime, os.path.getsize, os.W_OK, etc.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-list/attachments/20100713/a707bd07/attachment.html>


More information about the Python-list mailing list