/// <param name="archive"></param><param name="extractDirectory"></param> <param name="wantExtract"></param><param name="options"></param><returns></returns> private static List <TarEntry> ListOrExtract( string archive, string extractDirectory, bool wantExtract, Options options) { var t = new Tar { TarOptions = options ?? new Options() }; return(t.InternalListOrExtract(archive, extractDirectory, wantExtract)); }
/// <summary>Create a tar archive with the given name, and containing the given set of files or directories, and using GZIP compression by default.</summary> /// <param name="outputFile">The name of the tar archive to create. The file must not exist at the time of the call.</param> /// <param name="filesOrDirectories">A list of filenames and/or directory names to be added to the archive.</param> /// <param name="options">The options to use during Tar operation.</param> public static void CreateArchive( string outputFile, IEnumerable<string> filesOrDirectories, Options options = null) { if (options == null) { options = new Options { Compression = TarCompression.GZip }; } var tar = new Tar { TarOptions = options }; tar.InternalCreateArchive(outputFile, filesOrDirectories); }
/// <summary>Create a tar archive with the given name, and containing the given set of files or directories, and using GZIP compression by default.</summary> /// <param name="outputFile">The name of the tar archive to create. The file must not exist at the time of the call.</param> /// <param name="filesOrDirectories">A list of filenames and/or directory names to be added to the archive.</param> /// <param name="options">The options to use during Tar operation.</param> public static void CreateArchive( string outputFile, IEnumerable <string> filesOrDirectories, Options options = null) { if (options == null) { options = new Options { Compression = TarCompression.GZip }; } var tar = new Tar { TarOptions = options }; tar.InternalCreateArchive(outputFile, filesOrDirectories); }
/// <param name="archive"></param><param name="extractDirectory"></param> <param name="wantExtract"></param><param name="options"></param><returns></returns> private static List<TarEntry> ListOrExtract( string archive, string extractDirectory, bool wantExtract, Options options) { var t = new Tar { TarOptions = options ?? new Options() }; return t.InternalListOrExtract(archive, extractDirectory, wantExtract); }