MCPcopy Create free account
hub / github.com/comaps/comaps / GetWritableStorageStatus

Method GetWritableStorageStatus

libs/platform/platform_win.cpp:175–188  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

173}
174
175Platform::TStorageStatus Platform::GetWritableStorageStatus(uint64_t neededSize) const
176{
177 ULARGE_INTEGER freeSpace;
178 if (0 == ::GetDiskFreeSpaceExA(m_writableDir.c_str(), &freeSpace, NULL, NULL))
179 {
180 LOG(LWARNING, ("GetDiskFreeSpaceEx failed with error", GetLastError()));
181 return STORAGE_DISCONNECTED;
182 }
183
184 if (freeSpace.u.LowPart + (static_cast<uint64_t>(freeSpace.u.HighPart) << 32) < neededSize)
185 return NOT_ENOUGH_SPACE;
186
187 return STORAGE_OK;
188}
189
190bool Platform::IsDirectoryEmpty(std::string const & directory)
191{

Callers 4

HasSpaceForFilesFunction · 0.45
IsEnoughSpaceForDownloadFunction · 0.45
UNIT_TESTFunction · 0.45
CanDumpToDiskMethod · 0.45

Calls

no outgoing calls

Tested by 1

UNIT_TESTFunction · 0.36