Issue 10755: Add posix.fdlistdir - Python tracker
Created on 2010-12-22 07:26 by rosslagerwall, last changed 2022-04-11 14:57 by admin. This issue is now closed.
| Files | ||||
|---|---|---|---|---|
| File name | Uploaded | Description | Edit | |
| i_fdlistdir.patch | rosslagerwall, 2010-12-22 07:26 | Patch to add posix.fdlistdir | ||
| i10755.patch | rosslagerwall, 2010-12-23 04:52 | Updated patch | ||
| Messages (5) | |||
|---|---|---|---|
| msg124489 - (view) | Author: Ross Lagerwall (rosslagerwall) ![]() |
Date: 2010-12-22 07:26 | |
Along with #4761, the *at wrappers, it would be nice to have a patch adding the use of fdopendir. This patch adds a function fdlistdir, a unittest and documentation. |
|||
| msg124491 - (view) | Author: Martin v. Löwis (loewis) * ![]() |
Date: 2010-12-22 08:21 | |
What's the use case for this function? |
|||
| msg124493 - (view) | Author: Ross Lagerwall (rosslagerwall) ![]() |
Date: 2010-12-22 08:43 | |
When maintaining an fd to implement a per thread current directory, you can use it to get a list of files in the directory. For security reasons, instead of a named path, you can keep an fd to a directory so that if the path is changed externally while performing an operation, the open fd still points to the original directory. This function then allows you to list the contents of that fd. I think this is needed for #4489. |
|||
| msg124538 - (view) | Author: Ross Lagerwall (rosslagerwall) ![]() |
Date: 2010-12-23 04:52 | |
Hi, Attached is a slightly updated patch that improves doc and changes fdlistdir to always return strings, not bytes. |
|||
| msg129471 - (view) | Author: Antoine Pitrou (pitrou) * ![]() |
Date: 2011-02-25 23:41 | |
Committed in r88625. Thank you! |
|||
| History | |||
|---|---|---|---|
| Date | User | Action | Args |
| 2022-04-11 14:57:10 | admin | set | github: 54964 |
| 2011-02-25 23:41:43 | pitrou | set | status: open -> closed nosy: loewis, pitrou, christian.heimes, benjamin.peterson, daniel.urban, anacrolix, Chris.Gerhard, rosslagerwall messages: + msg129471 resolution: fixed |
| 2011-01-05 18:48:07 | pitrou | link | issue4489 dependencies |
| 2010-12-23 04:52:48 | rosslagerwall | set | files:
+ i10755.patch nosy: loewis, pitrou, christian.heimes, benjamin.peterson, daniel.urban, anacrolix, Chris.Gerhard, rosslagerwall messages: + msg124538 |
| 2010-12-22 08:43:44 | rosslagerwall | set | nosy:
loewis, pitrou, christian.heimes, benjamin.peterson, daniel.urban, anacrolix, Chris.Gerhard, rosslagerwall messages: + msg124493 |
| 2010-12-22 08:21:52 | loewis | set | nosy:
loewis, pitrou, christian.heimes, benjamin.peterson, daniel.urban, anacrolix, Chris.Gerhard, rosslagerwall messages: + msg124491 |
| 2010-12-22 07:26:12 | rosslagerwall | create | |
