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

Method removeLinkIfExists

Libraries/FileSystem/FileSystem.cpp:481–494  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

479}
480
481SC::Result SC::FileSystem::removeLinkIfExists(StringSpan source)
482{
483 if (existsAndIsLink(source))
484 {
485#if SC_PLATFORM_WINDOWS
486 if (existsAndIsDirectory(source))
487 {
488 return removeEmptyDirectories(Span<const StringSpan>{source});
489 }
490#endif
491 return removeFiles(Span<const StringSpan>{source});
492 }
493 return Result(true);
494}
495
496SC::Result SC::FileSystem::removeDirectoriesRecursive(Span<const StringSpan> directories)
497{

Callers 4

symbolicLinkMethod · 0.80
FileSystemTest.cppFile · 0.80
permissionsMethod · 0.80
packageInstallFunction · 0.80

Calls 1

ResultClass · 0.50

Tested by 2

symbolicLinkMethod · 0.64
permissionsMethod · 0.64