Closed
Bug 1741548
Opened 3 years ago
Closed 3 years ago
Add ignoreAbsent option to `IOUtils.getChildren` method
Categories
(Toolkit Graveyard :: OS.File, enhancement)
Toolkit Graveyard
OS.File
Tracking
(firefox96 fixed)
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•3 years ago
|
||
Remove an incorrect comment.
Updated•3 years 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•3 years ago
|
||
| bugherder | ||
Status: UNCONFIRMED → RESOLVED
Closed: 3 years ago
status-firefox96:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → 96 Branch
Updated•2 years ago
|
Product: Toolkit → Toolkit Graveyard
You need to log in
before you can comment on or make changes to this bug.
Description
•