MCPcopy Create free account
hub / github.com/Pagghiu/SaneCppLibraries / copyDirectory

Method copyDirectory

Libraries/FileSystem/FileSystem.cpp:1231–1244  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1229}
1230
1231SC::Result SC::FileSystem::Operations::copyDirectory(StringSpan source, StringSpan destination,
1232 FileSystemCopyFlags flags)
1233{
1234 SC_TRY_MSG(Internal::validatePath(source), "copyDirectory: Invalid source path");
1235 SC_TRY_MSG(Internal::validatePath(destination), "copyDirectory: Invalid destination path");
1236
1237 if (flags.overwrite == false and existsAndIsDirectory(destination))
1238 {
1239 return Result::Error("copyDirectory: Destination directory already exists");
1240 }
1241
1242 return Internal::copyDirectoryRecursive(source.getNullTerminatedNative(), destination.getNullTerminatedNative(),
1243 flags);
1244}
1245
1246SC::Result SC::FileSystem::Operations::removeDirectoryRecursive(StringSpan path)
1247{

Callers

nothing calls this directly

Calls 3

copyFileFunction · 0.85
ErrorEnum · 0.50
ResultClass · 0.50

Tested by

no test coverage detected