Exemple #1
0
        /// <summary>
        /// Creates an entry that has the specified data and entry name in the archive.
        /// </summary>
        /// <param name="source">The data to be added to the archive.</param>
        /// <param name="name">A path that specifies the name of the entry to be created.</param>
        internal ArchiveEntry(ArchiveWriter archiveWriter, Stream source, string name)
        {
            mode = Mode.Write;
            this.archiveWriter = archiveWriter;

            data        = new StreamView(source);
            this.offset = 0;
            this.length = (int)data.Length;
            this.name   = name;

            if (source is FileStream)
            {
                this.path = ((FileStream)source).Name;
            }
            else
            {
                this.path = String.Empty;
            }
        }
Exemple #2
0
        /// <summary>
        /// Creates an entry that has the specified data and entry name in the archive.
        /// </summary>
        /// <param name="source">The data to be added to the archive.</param>
        /// <param name="name">A path that specifies the name of the entry to be created.</param>
        internal ArchiveEntry(ArchiveWriter archiveWriter, Stream source, string name)
        {
            mode = Mode.Write;
            this.archiveWriter = archiveWriter;

            data = new StreamView(source);
            this.offset = 0;
            this.length = (int)data.Length;
            this.name = name;

            if (source is FileStream)
            {
                this.path = ((FileStream)source).Name;
            }
            else
            {
                this.path = String.Empty;
            }
        }
Exemple #3
0
        /// <summary>
        /// Initalizes a new instance of the ArchiveEntryCollection class.
        /// </summary>
        /// <param name="owner">The ArchiveWriter that owns this collection.</param>
        internal ArchiveEntryCollection(ArchiveWriter owner)
        {
            ownerWriter = owner;

            entries = new List <ArchiveEntry>();
        }
Exemple #4
0
        /// <summary>
        /// Initalizes a new instance of the ArchiveEntryCollection class.
        /// </summary>
        /// <param name="owner">The ArchiveWriter that owns this collection.</param>
        internal ArchiveEntryCollection(ArchiveWriter owner)
        {
            ownerWriter = owner;

            entries = new List<ArchiveEntry>();
        }