Closed Bug 1736855 Opened 3 years ago Closed 3 years ago

Migrate the IOUtils Migration Guide to Firefox Source Docs

Categories

(Toolkit Graveyard :: OS.File, task, P1)

Tracking

(firefox95 fixed)

RESOLVED FIXED
95 Branch
Tracking Status
firefox95 --- fixed

People

(Reporter: chutten, Assigned: chutten)

References

(Blocks 1 open bug)

Details

Attachments

(1 file)

The IOUtils Migration Guide is lovely. But it isn't the easiest to change when (for example) you notice that there is now indeed a IOUtils.exists method.

Let's move it to the sourcedocs, and replace the gdoc with a redirection notice to the new location, shall we?

A public gdoc's not bad, but source docs is better.
This place was chosen because the implementation is nearby,
even though it's really support for toolkit and browser stuff.

Pushed by chutten@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/1044b04cf89b Add IOUtils Migration Guide to source docs r=Gijs DONTBUILD
Status: ASSIGNED → RESOLVED
Closed: 3 years ago
Resolution: --- → FIXED
Target Milestone: --- → 95 Branch

I think this section should be edited to make the examples actually analogous. OS.File version says:

await OS.File.removeDir(path, { ignoreAbsent: true });

but IOUtils version says:

await IOUtils.remove(path, { recursive: true });

But this method does support ignoreAbsent. The IOUtils version should say:

await IOUtils.remove(path, { ignoreAbsent: true });

The difference is that OS.File.removeDir doesn't have a recursive property, and conversely, it has an ignorePermissions property that IOUtils.remove doesn't support. Maybe an options section for this method should be listed.

Blocks: 1743412

I don't actually know the code well enough to comment, so I've filed bug 1743412 for the discussion and for tracking the resulting work.

Product: Toolkit → Toolkit Graveyard
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: