aboutsummaryrefslogtreecommitdiff
path: root/src/WixToolset.Core/Cab/CabinetFileInfo.cs
diff options
context:
space:
mode:
Diffstat (limited to 'src/WixToolset.Core/Cab/CabinetFileInfo.cs')
-rw-r--r--src/WixToolset.Core/Cab/CabinetFileInfo.cs64
1 files changed, 64 insertions, 0 deletions
diff --git a/src/WixToolset.Core/Cab/CabinetFileInfo.cs b/src/WixToolset.Core/Cab/CabinetFileInfo.cs
new file mode 100644
index 00000000..849bb3bb
--- /dev/null
+++ b/src/WixToolset.Core/Cab/CabinetFileInfo.cs
@@ -0,0 +1,64 @@
1// Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information.
2
3namespace WixToolset
4{
5 using System;
6
7 /// <summary>
8 /// Properties of a file in a cabinet.
9 /// </summary>
10 internal sealed class CabinetFileInfo
11 {
12 private string fileId;
13 private ushort date;
14 private ushort time;
15 private int size;
16
17 /// <summary>
18 /// Constructs CabinetFileInfo
19 /// </summary>
20 /// <param name="fileId">File Id</param>
21 /// <param name="date">Last modified date (MS-DOS time)</param>
22 /// <param name="time">Last modified time (MS-DOS time)</param>
23 public CabinetFileInfo(string fileId, ushort date, ushort time, int size)
24 {
25 this.fileId = fileId;
26 this.date = date;
27 this.time = time;
28 this.size = size;
29 }
30
31 /// <summary>
32 /// Gets the file Id of the file.
33 /// </summary>
34 /// <value>file Id</value>
35 public string FileId
36 {
37 get { return this.fileId; }
38 }
39
40 /// <summary>
41 /// Gets modified date (DOS format).
42 /// </summary>
43 public ushort Date
44 {
45 get { return this.date; }
46 }
47
48 /// <summary>
49 /// Gets modified time (DOS format).
50 /// </summary>
51 public ushort Time
52 {
53 get { return this.time; }
54 }
55
56 /// <summary>
57 /// Gets the size of the file in bytes.
58 /// </summary>
59 public int Size
60 {
61 get { return this.size; }
62 }
63 }
64}