예제 #1
0
        /// <summary>
        /// Zips the folder to file system in this parent folder.
        /// </summary>
        /// <param name="archiveType">Type of the archive.</param>
        public ZipFileObject ZipFolderToFileSystem(ArchiveType archiveType)
        {
            var zipFileObject = new ZipFileObject(this, archiveType);

            zipFileObject.AddFromDirectory(FullName);
            return(zipFileObject);
        }
예제 #2
0
        /// <summary>
        /// Zips the folder to file system.
        /// </summary>
        /// <param name="fullPathToZipFile"></param>
        /// <param name="archiveType">Type of the archive.</param>
        /// <param name="writerOptions"></param>
        /// <param name="searchPattern"></param>
        /// <param name="searchOption"></param>
        public ZipFileObject ZipFolderToFileSystem(string fullPathToZipFile, ArchiveType archiveType,
                                                   WriterOptions writerOptions = null, string searchPattern = "*",
                                                   SearchOption searchOption   = SearchOption.AllDirectories)
        {
            var zipFileObject = new ZipFileObject(fullPathToZipFile, archiveType, null, writerOptions);

            zipFileObject.AddFromDirectory(FullName, searchPattern, searchOption);
            return(zipFileObject);
        }