Ejemplo n.º 1
0
 public ZipFileObject(FolderObject folderObject, ArchiveType type, string password = null) : base(folderObject.GetParentFolder().FullName + $"{folderObject.Name}{CompressExtensionHelper.ZipExtensionLookup[type]}")
 {
     ReaderOptions          = CompressExtensionHelper.DefaultReaderOptionsLookup[type];
     ReaderOptions.Password = password;
     WriterOptions          = CompressExtensionHelper.DefaultWriterOptionsLookup[type];
     Type = type;
 }
Ejemplo n.º 2
0
        public FolderObject AddFolder(string relativeFolderPath)
        {
            var folder = new FolderObject(FullName + relativeFolderPath);

            folder.Create(FolderOption.DoNothingIfExist);
            return(folder);
        }
Ejemplo n.º 3
0
 public void Compress(FolderObject folderObject, string searchPattern = "*", SearchOption searchOption = SearchOption.AllDirectories)
 {
     Compress(folderObject.FullName, searchPattern, searchOption);
 }