2010-03-05 Rodrigo Kumpera <rkumpera@novell.com>
[mcs.git] / class / WindowsBase / ZipSharp / UnzipFileInfo.cs
blobec134d97668a2b1ac7f6f6aab2723ad7c6362012
1 // FileInfo.cs created with MonoDevelop
2 // User: alan at 14:47 13/10/2008
3 //
4 // To change standard headers go to Edit->Preferences->Coding->Standard Headers
5 //
7 using System;
8 using System.Runtime.InteropServices;
10 namespace zipsharp
12 [StructLayout (LayoutKind.Sequential)]
13 struct UnzipFileInfo
15 IntPtr version; /* version made by 2 bytes */
16 IntPtr version_needed; /* version needed to extract 2 bytes */
17 IntPtr flag; /* general purpose bit flag 2 bytes */
18 IntPtr compression_method; /* compression method 2 bytes */
19 IntPtr dosDate; /* last mod file date in Dos fmt 4 bytes */
20 IntPtr crc; /* crc-32 4 bytes */
21 IntPtr compressed_size; /* compressed size 4 bytes */
22 IntPtr uncompressed_size; /* uncompressed size 4 bytes */
23 IntPtr size_filename; /* filename length 2 bytes */
24 IntPtr size_file_extra; /* extra field length 2 bytes */
25 IntPtr size_file_comment; /* file comment length 2 bytes */
27 IntPtr disk_num_start; /* disk number start 2 bytes */
28 IntPtr internal_fa; /* internal file attributes 2 bytes */
29 IntPtr external_fa; /* external file attributes 4 bytes */
31 ZipTime tmu_date;
33 public ulong VersionNeeded {
34 get { return (ulong)version_needed.ToInt64 (); }
35 set { version_needed = new IntPtr ((int)value); }
38 public ulong Version {
39 get { return (ulong)version.ToInt64 (); }
40 set { version = new IntPtr ((int)value); }
43 public ulong UncompressedSize {
44 get { return (ulong)uncompressed_size.ToInt64 (); }
45 set { uncompressed_size = new IntPtr ((int)value); }
48 public ZipTime TmuDate {
49 get { return tmu_date; }
50 set { tmu_date = value; }
53 public ulong SizeFilename {
54 get { return (ulong)size_filename.ToInt64 (); }
55 set { size_filename = new IntPtr ((int)value); }
58 public ulong SizeFileExtra {
59 get { return (ulong)size_file_extra.ToInt64 (); }
60 set { size_file_extra = new IntPtr ((int)value); }
63 public ulong SizeFileComment {
64 get {
65 return (ulong)size_file_comment.ToInt64 ();
67 set {
68 size_file_comment = new IntPtr ((int)value);
72 public ulong InternalFa {
73 get { return (ulong)internal_fa.ToInt64 (); }
74 set { internal_fa = new IntPtr ((int)value); }
77 public ulong Flag {
78 get { return (ulong)flag.ToInt64 (); }
79 set { flag = new IntPtr ((int)value); }
82 public ulong ExternalFa {
83 get { return (ulong)external_fa.ToInt64 (); }
84 set { external_fa = new IntPtr ((int)value); }
87 public ulong DosDate {
88 get { return (ulong)dosDate.ToInt64 (); }
89 set { dosDate = new IntPtr ((int)value); }
92 public ulong DiskNumStart {
93 get { return (ulong)disk_num_start.ToInt64 (); }
94 set { disk_num_start = new IntPtr ((int)value); }
97 public ulong Crc {
98 get { return (ulong)crc.ToInt64 (); }
99 set { crc = new IntPtr ((int)value); }
102 public ulong CompressionMethod {
103 get { return (ulong)compression_method.ToInt64 (); }
104 set { compression_method = new IntPtr ((int)value); }
107 public ulong CompressedSize {
108 get { return (ulong)compressed_size.ToInt64 (); }
109 set { compressed_size = new IntPtr ((int)value); }