Last change
on this file since 21526 was 15927, checked in by anna, 16 years ago |
The old method for checking free disk space overflows (returns a negative number) when the physical free disk space is bigger than 4G. So instead of comparing by byte, now we compare by K. The return type is also changed, from unsigned long to double.
|
-
Property svn:keywords
set to
Author Date Id Revision
|
File size:
386 bytes
|
Line | |
---|
1 | #ifndef _DISKSPACE_H_
|
---|
2 | #define _DISKSPACE_H_
|
---|
3 | #include <windows.h>
|
---|
4 |
|
---|
5 | class DiskSpace {
|
---|
6 | private:
|
---|
7 | DWORD sectorsPerCluster;
|
---|
8 | DWORD bytesPerSector;
|
---|
9 | DWORD freeClusters;
|
---|
10 | BOOL initialised;
|
---|
11 | protected:
|
---|
12 | public:
|
---|
13 | DiskSpace(const char *root);
|
---|
14 | int fileSpace(int fileSize);
|
---|
15 | int fileClusters(int fileSize);
|
---|
16 | BOOL initialisedOk();
|
---|
17 | unsigned double totalFreeSpace();
|
---|
18 | };
|
---|
19 |
|
---|
20 | #endif
|
---|
Note:
See
TracBrowser
for help on using the repository browser.