Example #1
0
 public void PutNextEntry(TarEntry entry)
 {
     if (entry.TarHeader.name.Length > TarHeader.NAMELEN)
     {
         throw new InvalidHeaderException(string.Concat(new object[] { "file name '", entry.TarHeader.name, "' is too long ( > ", TarHeader.NAMELEN, " bytes )" }));
     }
     entry.WriteEntryHeader(this.recordBuf);
     this.buffer.WriteRecord(this.recordBuf);
     this.currBytes = 0;
     this.currSize = entry.IsDirectory ? 0 : ((int) entry.Size);
 }