public FilePath GetCurrentFile(FilePath basePath)
        {
            var filesWithSuffix = RollingStrategyHelper.DiscoverExistingFiles(basePath, fileSystem, suffixFormatter);

            var part     = 1;
            var lastFile = filesWithSuffix.LastOrDefault();

            if (lastFile.suffix != null)
            {
                part = lastFile.suffix.Value;
                if (sizeBasedRoller.ShouldRollOver(lastFile.path))
                {
                    part++;
                }
            }

            return(RollingStrategyHelper.AddSuffix(basePath, suffixFormatter.FormatSuffix(part), false));
        }
 public FilePath GetCurrentFile(FilePath basePath) => RollingStrategyHelper.AddSuffix(basePath, suffixFormatter.FormatSuffix(timeProvider()), false);
 public IEnumerable <FilePath> DiscoverExistingFiles(FilePath basePath) =>
 RollingStrategyHelper.DiscoverExistingFiles(basePath, fileSystem, suffixFormatter).Select(file => file.path);