// DeleteDirectory(buffer<bytes<0x301>, 0x19, 0x301> path) public long DeleteDirectory(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.DeleteDirectory(name); } catch (DirectoryNotFoundException) { return(MakeError(ErrorModule.Fs, FsErr.PathDoesNotExist)); } catch (UnauthorizedAccessException) { Logger.PrintError(LogClass.ServiceFs, $"Unable to access {name}"); throw; } return(0); }
// DeleteDirectory(buffer<bytes<0x301>, 0x19, 0x301> path) public long DeleteDirectory(ServiceCtx context) { string name = ReadUtf8String(context); try { _fileSystem.DeleteDirectory(name); } catch (HorizonResultException ex) { return(ex.ResultValue.Value); } return(0); }
// DeleteDirectory(buffer<bytes<0x301>, 0x19, 0x301> path) public ResultCode DeleteDirectory(ServiceCtx context) { string name = ReadUtf8String(context); try { _fileSystem.DeleteDirectory(name); } catch (HorizonResultException ex) { return((ResultCode)ex.ResultValue.Value); } return(ResultCode.Success); }
// DeleteDirectory(buffer<bytes<0x301>, 0x19, 0x301> path) public ResultCode DeleteDirectory(ServiceCtx context) { string name = ReadUtf8String(context); return((ResultCode)_fileSystem.DeleteDirectory(name).Value); }