Closed
Bug 1741548
Opened 1 year ago
Closed 1 year ago
Add ignoreAbsent option to `IOUtils.getChildren` method
Categories
(Toolkit :: OS.File, enhancement)
Toolkit
OS.File
Tracking
()
RESOLVED
FIXED
96 Branch
Tracking | Status | |
---|---|---|
firefox96 | --- | fixed |
People
(Reporter: mathew.hodson, Assigned: mathew.hodson)
Details
Attachments
(1 file)
Code sometimes checks if a directory exists before iterating over it. The equivalent call with IOUtils would be with IOUtils.exists
. We could avoid the accompanying IO in those cases with a new ignoreAbsent option for IOUtils.getChildren
similar to the one for IOUtils.remove
.
Examples:
https://searchfox.org/mozilla-central/rev/6deb8b6af57a8b5b6b1bcb143ea498e566475d8d/toolkit/mozapps/extensions/internal/XPIInstall.jsm#3480
https://searchfox.org/mozilla-central/rev/6deb8b6af57a8b5b6b1bcb143ea498e566475d8d/browser/components/sessionstore/SessionWorker.js#381
Assignee | ||
Comment 1•1 year ago
|
||
Remove an incorrect comment.
Updated•1 year ago
|
Assignee: nobody → mathew.hodson
Pushed by mbanner@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/95498b2c7460 Add ignoreAbsent option to `IOUtils.getChildren` method. r=barret
Comment 3•1 year ago
|
||
bugherder |
Status: UNCONFIRMED → RESOLVED
Closed: 1 year ago
status-firefox96:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → 96 Branch
You need to log in
before you can comment on or make changes to this bug.
Description
•