[issue12898] add opendir() for POSIX platforms
Antoine Pitrou
report at bugs.python.org
Mon Sep 5 18:16:27 CEST 2011
Antoine Pitrou <pitrou at free.fr> added the comment:
> I was proposing adding a function to open directory fds, because
> there isn't one; fdlistdir(), like many other POSIX functions
> available in Python, consumes directory fds.
I don't think I understand. This already works:
>>> fd = os.open("Misc", os.O_RDONLY)
>>> os.fdlistdir(fd)
['python.pc', 'README.coverity', 'ACKS.orig', 'NEWS.orig', 'HISTORY', 'python.man', 'valgrind-python.supp', 'TextMate', 'python-config.in', 'NEWS', 'RPM', 'vgrindefs', 'svnmap.txt', 'python-wing4.wpr', 'gdbinit', 'build.sh', 'README.AIX', 'Vim', 'SpecialBuilds.txt', 'indent.pro', 'python-wing3.wpr', 'ACKS', 'README', 'README.valgrind', 'Porting', 'python.pc.in']
Is there anything you want to do on a "directory fd" except listing its contents?
----------
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue12898>
_______________________________________
More information about the Python-bugs-list
mailing list