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

Method removeFile

Libraries/Async/Async.cpp:852–869  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

850}
851
852SC::Result SC::AsyncFileSystemOperation::removeFile(AsyncEventLoop& eventLoop, StringSpan path)
853{
854 SC_TRY(checkState());
855 operation = Operation::RemoveFile;
856 new (&removeData, PlacementNew()) RemoveData({path});
857 if (not eventLoop.needsThreadPoolForFileOperations() and threadPoolMode != AsyncThreadPoolMode::ForceThreadPool)
858 {
859 return eventLoop.start(*this);
860 }
861
862 loopWork.work = [&]()
863 {
864 SC_TRY(FileSystem::Operations::removeFile(removeData.path));
865 return SC::Result(true);
866 };
867 loopWork.callback.bind<AsyncFileSystemOperation, &AsyncFileSystemOperation::onOperationCompleted>(*this);
868 return eventLoop.start(loopWork);
869}
870
871SC::Result SC::AsyncFileSystemOperation::copyDirectory(AsyncEventLoop& eventLoop, StringSpan path,
872 StringSpan destinationPath, FileSystemCopyFlags copyFlags)

Callers 15

customMimeLookupMethod · 0.45
httpFileServerTestMethod · 0.45
putSpanBodyMethod · 0.45
requestOptionsMethod · 0.45
putStreamBodyMethod · 0.45
multipartUploadMethod · 0.45
eventLoopSubdirectoryMethod · 0.45
eventLoopWatchStopMethod · 0.45
threadRunnerMethod · 0.45
processForkMethod · 0.45
testOpenMethod · 0.45

Calls 5

PlacementNewClass · 0.85
removeFileFunction · 0.85
ResultClass · 0.70
startMethod · 0.45

Tested by 15

customMimeLookupMethod · 0.36
httpFileServerTestMethod · 0.36
putSpanBodyMethod · 0.36
requestOptionsMethod · 0.36
putStreamBodyMethod · 0.36
multipartUploadMethod · 0.36
eventLoopSubdirectoryMethod · 0.36
eventLoopWatchStopMethod · 0.36
threadRunnerMethod · 0.36
processForkMethod · 0.36
testOpenMethod · 0.36