Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 13 additions & 11 deletions Native.cs
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,8 @@
using System;
using System.Runtime.InteropServices;

[assembly: DefaultDllImportSearchPathsAttribute(DllImportSearchPath.SafeDirectories)]

namespace Xamarin.Tools.Zip
{
internal class Native
Expand All @@ -47,16 +49,16 @@ public struct zip_source_args_seek_t

public struct zip_stat_t
{
public UInt64 valid; /* which fields have valid values */
public IntPtr name; /* name of the file (char *) */
public UInt64 index; /* index within archive */
public UInt64 size; /* size of file (uncompressed) */
public UInt64 comp_size; /* size of file (compressed) */
public IntPtr mtime; /* modification time (time_t) */
public UInt32 crc; /* crc of file data */
public Int16 comp_method; /* compression method used */
public UInt16 encryption_method; /* encryption method used */
public UInt32 flags; /* reserved for future use */
public UInt64 valid; /* which fields have valid values */
public IntPtr name; /* name of the file (char *) */
public UInt64 index; /* index within archive */
public UInt64 size; /* size of file (uncompressed) */
public UInt64 comp_size; /* size of file (compressed) */
public IntPtr mtime; /* modification time (time_t) */
public UInt32 crc; /* crc of file data */
public Int16 comp_method; /* compression method used */
public UInt16 encryption_method; /* encryption method used */
public UInt32 flags; /* reserved for future use */
};

[UnmanagedFunctionPointer (CallingConvention.Cdecl)]
Expand Down Expand Up @@ -360,7 +362,7 @@ public static int zip_set_file_comment (IntPtr archive, UInt64 index, string com

[DllImport (ZIP_LIBNAME, CallingConvention = CallingConvention.Cdecl)]
public static extern int zip_set_file_compression (IntPtr archive, UInt64 index, CompressionMethod comp, UInt32 comp_flags);

[DllImport (ZIP_LIBNAME, CallingConvention = CallingConvention.Cdecl)]
public static extern int zip_file_set_mtime(IntPtr archive, UInt64 index, ulong mtime, UInt32 flags);

Expand Down