public Builder(ArchivedFile original) : base(original) { Stream = original.Stream; Offset = original.Offset; Length = original.Length; Checksum = original.Checksum; Attributes = original.Attributes; Creation = original.Creation; LastWrite = original.LastWrite; LastAccess = original.LastAccess; }
private static void SetFileAttributes(string path, ManagedLzma.SevenZip.FileModel.ArchivedFile file) { if (file.Attributes.HasValue) { // When calling File.SetAttributes we need to preserve existing attributes which are not part of the archive var attr = File.GetAttributes(path); const FileAttributes kAttrMask = ArchivedAttributesExtensions.FileAttributeMask; attr = (attr & ~kAttrMask) | (file.Attributes.Value.ToFileAttributes() & kAttrMask); File.SetAttributes(path, attr); } }