Closed Bug 1469974 Opened 7 years ago Closed 3 years ago

Allow passing offset for read / write operations

Categories

(Toolkit Graveyard :: OS.File, enhancement)

enhancement
Not set
normal

Tracking

(firefox62 affected)

RESOLVED WONTFIX
Tracking Status
firefox62 --- affected

People

(Reporter: irakli, Unassigned)

Details

Current API does not allow writes from specified offset. Technically setPosition could be used it perform writes from specific offset, but that can't be used for concurrent writes at different offsets. We are trying to bring distributed web protocol like Dat, IPFS, SSB into Firefox via extensions and as they replicate data from p2p networks they often write at different offsets in parallel, introducing scheduling would greatly reduce they're performance. I also seems that there OS.File even creates bindings for (pwrite)[https://github.com/mozilla/gecko-dev/blob/3c701634e0abd5c7f7ce89074b84eb96759ea844/toolkit/components/osfile/modules/osfile_unix_back.jsm#L421-L425] but they don't seem to exposed. I'll be willing to do the work if someone is willing to mentor.
Summary: Support offset on write → Allow passing offset for read / write operations

Mass closure: OSFIle is being replaced with IOUtils and PathUtils. If you think this bug was closed in error, please re-open.

Status: NEW → RESOLVED
Closed: 3 years ago
Resolution: --- → WONTFIX
Product: Toolkit → Toolkit Graveyard
You need to log in before you can comment on or make changes to this bug.