MCPcopy Create free account
hub / github.com/TorqueGameEngines/Torque3D / remove

Method remove

Engine/source/platformWin32/winVolume.cpp:293–308  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

291}
292
293bool Win32FileSystem::remove(const Path& path)
294{
295 // Should probably check for outstanding files or directory objects.
296 String file = PathToOS(_BuildFileName(mVolume,path));
297
298 WIN32_FIND_DATAW info;
299 HANDLE handle = ::FindFirstFileW(file.utf16(), &info);
300 ::FindClose(handle);
301 if (handle == INVALID_HANDLE_VALUE)
302 return false;
303
304 if (S_ISDIR(info.dwFileAttributes))
305 return ::RemoveDirectoryW(file.utf16());
306
307 return ::DeleteFileW(file.utf16());
308}
309
310bool Win32FileSystem::rename(const Path& from,const Path& to)
311{

Callers

nothing calls this directly

Calls 3

PathToOSFunction · 0.85
_BuildFileNameFunction · 0.85
utf16Method · 0.45

Tested by

no test coverage detected