Example #1
0
        protected AbstractDownloadsDirectory(
            string path,
            DirectorySeparatorChars directorySeparatorChars)
        {
            if (string.IsNullOrWhiteSpace(path))
            {
                throw new ArgumentException("Value cannot be null or whitespace.", nameof(path));
            }

            var(dirSeparator, altDirSeparator) = directorySeparatorChars;
            _path =
                path
                .TrimEnd(dirSeparator)
                .TrimEnd(altDirSeparator)
                + dirSeparator;
        }
Example #2
0
 public CompletedDownloadsDirectory(
     DownloadDirectoriesOptions options,
     DirectorySeparatorChars directorySeparatorChars)
     : base(options.Completed, directorySeparatorChars)
 {
 }
Example #3
0
 public IncompleteDownloadsDirectory(
     DownloadDirectoriesOptions options,
     DirectorySeparatorChars directorySeparatorChars)
     : base(options.Incomplete, directorySeparatorChars)
 {
 }