Closed Bug 1740212 Opened 3 years ago Closed 2 years ago

Implement nsLocalFile::GetDiskCapacity on Windows

Categories

(Core :: XPCOM, task, P2)

Unspecified
Windows
task

Tracking

()

RESOLVED FIXED
97 Branch
Tracking Status
firefox97 --- fixed

People

(Reporter: janv, Assigned: jjalkanen)

References

Details

Attachments

(1 file)

We are adding a new nsIFile attribute in bug 1735717 and the initial patch implements it only on unix/mac. We need Windows implementation as well.

Jari, can you take this ?
Thanks.

Flags: needinfo?(jjalkanen)

(In reply to Jan Varga [:janv] from comment #1)

Jari, can you take this ?
Thanks.

Done!

Assignee: nobody → jjalkanen
Flags: needinfo?(jjalkanen)

To avoid misunderstandings, should this return the total size of the hard drive, or total size of the OS partition, or the total size available to the user, or something else?

Flags: needinfo?(jvarga)

(In reply to Jari Jalkanen from comment #3)

To avoid misunderstandings, should this return the total size of the hard drive, or total size of the OS partition, or the total size available to the user, or something else?

I think returning total size of the hard drive doesn't make sense. It should be related to the file/directory which nsIFile represents, so total size of the OS partition is probably what we want here. The Unix implementations takes into account quota limits, so the total size available to the user would be even better it seems.

I quickly looked at the GetDiskSpaceAvailable implementation on Windows and it uses GetDiskFreeSpaceExW. I would probably use the same function in GetDiskCapacity.

Flags: needinfo?(jvarga)
Attachment #9250258 - Attachment description: WIP: Bug 1740212 - Get disk capacity on Windows → Bug 1740212 - Get disk capacity on Windows. r=#dom-storage-reviewers
Pushed by jjalkanen@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/9732cf85df9f
Get disk capacity on Windows. r=dom-storage-reviewers,janv,xpcom-reviewers,nika DONTBUILD
Status: NEW → RESOLVED
Closed: 2 years ago
Resolution: --- → FIXED
Target Milestone: --- → 97 Branch
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: