| 1229 | } |
| 1230 | |
| 1231 | SC::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 | |
| 1246 | SC::Result SC::FileSystem::Operations::removeDirectoryRecursive(StringSpan path) |
| 1247 | { |