/// <summary> /// Write an entry to the archive. This method will call the putNextEntry /// and then write the contents of the entry, and finally call closeEntry() /// for entries that are files. For directories, it will call putNextEntry(), /// and then, if the recurse flag is true, process each entry that is a /// child of the directory. /// </summary> /// <param name="sourceEntry"> /// The TarEntry representing the entry to write to the archive. /// </param> /// <param name="recurse"> /// If true, process the children of directory entries. /// </param> public void WriteEntry(TarEntry sourceEntry, bool recurse) { if (sourceEntry == null) { throw new ArgumentNullException("sourceEntry"); } if (isDisposed) { throw new ObjectDisposedException("TarArchive"); } try { if (recurse) { TarHeader.SetValueDefaults(sourceEntry.UserId, sourceEntry.UserName, sourceEntry.GroupId, sourceEntry.GroupName); } WriteEntryCore(sourceEntry, recurse); } finally { if (recurse) { TarHeader.RestoreSetValues(); } } }
public void WriteEntry(TarEntry sourceEntry, bool recurse) { //IL_0008: Unknown result type (might be due to invalid IL or missing references) //IL_001b: Unknown result type (might be due to invalid IL or missing references) if (sourceEntry == null) { throw new ArgumentNullException("sourceEntry"); } if (isDisposed) { throw new ObjectDisposedException("TarArchive"); } try { if (recurse) { TarHeader.SetValueDefaults(sourceEntry.UserId, sourceEntry.UserName, sourceEntry.GroupId, sourceEntry.GroupName); } WriteEntryCore(sourceEntry, recurse); } finally { if (recurse) { TarHeader.RestoreSetValues(); } } }
public void WriteEntry(TarEntry sourceEntry, bool recurse) { try { if (recurse) { TarHeader.SetValueDefaults(sourceEntry.UserId, sourceEntry.UserName, sourceEntry.GroupId, sourceEntry.GroupName); } this.InternalWriteEntry(sourceEntry, recurse); } finally { if (recurse) { TarHeader.RestoreSetValues(); } } }