| Index: base/sys_info_win.cc
|
| ===================================================================
|
| --- base/sys_info_win.cc (revision 2357)
|
| +++ base/sys_info_win.cc (working copy)
|
| @@ -29,4 +29,13 @@
|
| return static_cast<int64>(memory_info.ullTotalPhys);
|
| }
|
|
|
| +// static
|
| +int64 SysInfo::AmountOfFreeDiskSpace(const std::wstring& path) {
|
| + ULARGE_INTEGER available, total, free;
|
| + if (!GetDiskFreeSpaceExW(path.c_str(), &available, &total, &free)) {
|
| + return 0;
|
| + }
|
| + return static_cast<int64>(available.QuadPart);
|
| +}
|
| +
|
| } // namespace base
|
|
|