/// <summary> /// Open a stream to write data to the entry. /// </summary> /// <param name="tarAccess">The archive that will contain this entry.</param> /// <returns>The stream to write to.</returns> public Stream OpenOutputStream(TarAccessSharpZipLib tarAccess) { var stream = new OutputStream(tarAccess, this); return(stream); }
/// <summary> /// Initializes a new instance of <see cref="OutputStream"/>. /// </summary> /// <param name="tarAccess">The TAR archive to which the contents of <paramref name="tarArchiveEntry"/> is to be written.</param> /// <param name="tarArchiveEntry">A previously created <see cref="TarEntry"/> that will be written to.</param> public OutputStream(TarAccessSharpZipLib tarAccess, TarArchiveEntry tarArchiveEntry) { _tarAccess = tarAccess; _tarArchiveEntry = tarArchiveEntry; }
/// <summary> /// Creates a new instance of <see cref="TarAccessSharpZipLib"/> using the given mode. /// </summary> /// <param name="stream">Stream containing data in TAR format.</param> /// <param name="mode">The access mode to use for TAR operations.</param> /// <returns>A new instance of <see cref="TarAccessSharpZipLib"/>.</returns> /// <remarks>The TAR implementation assumes ownership of <paramref name="stream"/> and will dispose it.</remarks> public static TarAccessSharpZipLib Create(Stream stream, CompressedArchiveAccessMode mode) { var tarAccess = new TarAccessSharpZipLib(stream, ValidateMode(mode)); return(tarAccess); }