private async Task CleanFilesAsync(string schemaName, string directoryName, string dumpFileName, CancellationToken cancellationToken) { var filter = dumpFileName?.Replace("~partno~", "*"); var files = await _dbFileService.GetFilesAsync(directoryName, cancellationToken); var fileNames = files.Select(x => x.FileName); var schemaFileNames = FileMaskUtils.FileNamesMatchingFilter(fileNames, filter); foreach (var schemaFileName in schemaFileNames) { await _dbFileService.DeleteFileAsync(schemaFileName, directoryName, cancellationToken); } }
public async Task DeleteFile(CancellationToken cancellationToken, string fileName, [FromQuery] string directoryName) { await _dbFileService.DeleteFileAsync(fileName, directoryName, cancellationToken); }