Implement directory iterator for IOUtils
Categories
(Toolkit Graveyard :: OS.File, enhancement)
Tracking
(firefox82 fixed)
Tracking | Status | |
---|---|---|
firefox82 | --- | fixed |
People
(Reporter: mail, Assigned: mail)
References
Details
Attachments
(1 file)
IOUtils does not currently implement a directory iterator. It would be great to support asynchronous iteration over directory entries.
Assignee | ||
Comment 1•4 years ago
|
||
For idiomatic directory iteration, this might require support for web IDL's async iterables.
Assignee | ||
Comment 2•4 years ago
|
||
@barret points out that rather than making a new instantiable async directory iteratory, we can probably just add a method like the following to IOUtils:
namespace IOUtils {
Promise<Sequence<DOMString>> getChildren(DOMString path);
}
which would be used as for (const dirEntry of await IOUtils.getChildren(DOMString path))
, removing the need for async iterable support for this feature.
Assignee | ||
Comment 3•4 years ago
|
||
This change introduces a getChildren
method to the IOUtils interface, which
returns an array of absolute paths pointing to the immediate children of a
directory.
This method should provide equivalent functionality to creating a new
OS.File.DirectoryIterator
.
Depends on D87873
Updated•4 years ago
|
Comment 5•4 years ago
•
|
||
Backed out for perma failures.
Logs:
XPCSHELL:
https://treeherder.mozilla.org/logviewer.html#/jobs?job_id=314044781&repo=autoland&lineNumber=2795
https://treeherder.mozilla.org/logviewer.html#/jobs?job_id=314044782&repo=autoland&lineNumber=4593
https://treeherder.mozilla.org/logviewer.html#/jobs?job_id=314045620&repo=autoland&lineNumber=5959
https://treeherder.mozilla.org/logviewer.html#/jobs?job_id=314045636&repo=autoland&lineNumber=6463
Marionette:
https://treeherder.mozilla.org/logviewer.html#/jobs?job_id=314046376&repo=autoland&lineNumber=58417
TV: https://treeherder.mozilla.org/logviewer.html#/jobs?job_id=314045025&repo=autoland&lineNumber=5781
Backout: https://hg.mozilla.org/integration/autoland/rev/db87b470f1d494518772248e0c34ec49dbded629
Assignee | ||
Comment 6•4 years ago
|
||
Hm, I've reordered the commits in the patchset that @barret tried to land yesterday. These failures aren't related to this bug, but rather to changes I made to address bug 1649595.
We can try to reland this change today, while I investigate the CrashMonitor unit test failures.
Comment 8•4 years ago
|
||
Backed out for build bustages on IOUtils.cpp
Backout link: https://hg.mozilla.org/integration/autoland/rev/827f8ba12fdbabb7b19b36368a33dd27cd4954af
Log link: https://treeherder.mozilla.org/logviewer.html#/jobs?job_id=314117709&repo=autoland&lineNumber=13875
Assignee | ||
Comment 9•4 years ago
|
||
This was a result of an error with rebasing some of my patches, sorry! Fixed in patch D87875 :)
Comment 10•4 years ago
|
||
Comment 11•4 years ago
|
||
Backed out for build bustages.
Log: https://treeherder.mozilla.org/logviewer.html#/jobs?job_id=314255099&repo=autoland&lineNumber=11346
Backout: https://hg.mozilla.org/integration/autoland/rev/69c9cafe09e9d53c93845ac5232171bbc7f8ebca
Comment 12•4 years ago
|
||
Comment 13•4 years ago
|
||
bugherder |
Assignee | ||
Updated•4 years ago
|
Updated•2 years ago
|
Description
•