Closed
Bug 905509
Opened 12 years ago
Closed 12 years ago
[OS.File] OS.File needs a way to change the modified time of a file.
Categories
(Toolkit Graveyard :: OS.File, defect)
Toolkit Graveyard
OS.File
Tracking
(Not tracked)
RESOLVED
DUPLICATE
of bug 924916
People
(Reporter: markh, Unassigned)
Details
(Whiteboard: [Async][mentor=Yoric][lang=js])
Bug 897880 introduced a requirement to "touch" a file using OS.File, but there's no OS.File way to achieve this. That bug introduces a nasty hack to achieve it, but we'd like to replace it with something sane. As it needs to do it in a ChromeWorker, there's no access to nsIFile either.
(It might make sense to make more of the "stat" object writable, but I'll initially keep this bug to the narrow scope needed by bug 897880)
Comment 1•12 years ago
|
||
I have browsed quickly the source code of GNU touch and it seems to simply open for append then close. Barring any mistake, this is exactly your nasty hack of bug 897880. I suspect that we can't do any better under Windows, either.
Reporter | ||
Comment 2•12 years ago
|
||
(In reply to David Rajchenbach Teller [:Yoric] from comment #1)
> I have browsed quickly the source code of GNU touch and it seems to simply
> open for append then close. Barring any mistake, this is exactly your nasty
> hack of bug 897880. I suspect that we can't do any better under Windows,
> either.
I actually tried that in bug 897880 but couldn't make it work. As checked in, that bug reads 1 byte from the file and writes it back. It may be that I did something wrong though.
Comment 3•12 years ago
|
||
Handled in bug 924916.
Status: NEW → RESOLVED
Closed: 12 years ago
Resolution: --- → DUPLICATE
Summary: OS.File needs a way to change the modified time of a file. → [OS.File] OS.File needs a way to change the modified time of a file.
Whiteboard: [Async][mentor=Yoric][lang=js]
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
•