MCPcopy Create free account
hub / github.com/crownengine/crown / rename

Function rename

src/core/os.cpp:320–335  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

318 }
319
320 RenameResult rename(const char *old_name, const char *new_name)
321 {
322 RenameResult rr;
323#if CROWN_PLATFORM_WINDOWS
324 if (MoveFileEx(old_name, new_name, MOVEFILE_REPLACE_EXISTING) != 0)
325 rr.error = RenameResult::SUCCESS;
326 else
327 rr.error = RenameResult::UNKNOWN;
328#else
329 if (::rename(old_name, new_name) == 0)
330 rr.error = RenameResult::SUCCESS;
331 else
332 rr.error = RenameResult::UNKNOWN;
333#endif
334 return rr;
335 }
336
337} // namespace os
338

Callers 5

lib_os.cFile · 0.85
os_renameFunction · 0.85
test_file_monitorFunction · 0.85
renameMethod · 0.85
write_requestMethod · 0.85

Calls

no outgoing calls

Tested by 1

test_file_monitorFunction · 0.68