private IEnumerable<string> GetLogFileLines(string logFileName, string directoryName) { if (!_dbFileService.FileExistsAsync(logFileName, directoryName, CancellationToken.None).Result) { return Enumerable.Empty<string>(); } var logFileStream = _dbFileService.GetFileReadStream(logFileName, directoryName); var reader = new StreamReader(logFileStream); return ReadAllLines(reader); }
public async Task <bool> FileExists(CancellationToken cancellationToken, string fileName, [FromQuery] string directoryName) { return(await _dbFileService.FileExistsAsync(fileName, directoryName, cancellationToken)); }