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

Method copyDirectory

Libraries/Async/Async.cpp:871–885  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

869}
870
871SC::Result SC::AsyncFileSystemOperation::copyDirectory(AsyncEventLoop& eventLoop, StringSpan path,
872 StringSpan destinationPath, FileSystemCopyFlags copyFlags)
873{
874 SC_TRY(checkState());
875 operation = Operation::CopyDirectory;
876 new (&copyDirectoryData, PlacementNew()) CopyDirectoryData({path, destinationPath, copyFlags});
877 loopWork.work = [&]()
878 {
879 SC_TRY(FileSystem::Operations::copyDirectory(copyDirectoryData.path, copyDirectoryData.destinationPath,
880 copyDirectoryData.copyFlags));
881 return SC::Result(true);
882 };
883 loopWork.callback.bind<AsyncFileSystemOperation, &AsyncFileSystemOperation::onOperationCompleted>(*this);
884 return eventLoop.start(loopWork);
885}
886
887//-------------------------------------------------------------------------------------------------------
888// AsyncEventLoop

Callers 5

PluginTestMethod · 0.45
snippetMethod · 0.45
await_suspendMethod · 0.45
packageInstallFunction · 0.45

Calls 4

PlacementNewClass · 0.85
copyDirectoryFunction · 0.85
ResultClass · 0.70
startMethod · 0.45

Tested by 3

PluginTestMethod · 0.36
snippetMethod · 0.36