// DeleteDirectoryRecursively(buffer<bytes<0x301>, 0x19, 0x301> path) public long DeleteDirectoryRecursively(ServiceCtx context) { string name = ReadUtf8String(context); if (!_provider.DirectoryExists(name)) { return(MakeError(ErrorModule.Fs, FsErr.PathDoesNotExist)); } if (IsPathAlreadyInUse(name)) { return(MakeError(ErrorModule.Fs, FsErr.PathAlreadyInUse)); } try { _provider.DeleteDirectoryRecursively(name); } catch (UnauthorizedAccessException) { Logger.PrintError(LogClass.ServiceFs, $"Unable to access {name}"); throw; } return(0); }
// DeleteDirectoryRecursively(buffer<bytes<0x301>, 0x19, 0x301> path) public long DeleteDirectoryRecursively(ServiceCtx context) { string name = ReadUtf8String(context); try { _fileSystem.DeleteDirectoryRecursively(name); } catch (HorizonResultException ex) { return(ex.ResultValue.Value); } return(0); }
// DeleteDirectoryRecursively(buffer<bytes<0x301>, 0x19, 0x301> path) public ResultCode DeleteDirectoryRecursively(ServiceCtx context) { string name = ReadUtf8String(context); return((ResultCode)_fileSystem.DeleteDirectoryRecursively(name).Value); }