using System;
using Il2CppInterop.Common.Attributes;
using Il2CppInterop.Runtime;
using Il2CppInterop.Runtime.InteropTypes.Arrays;
using Il2CppSystem;
using Il2CppSystem.Collections.Generic;

namespace MarsSDK
{
	// Token: 0x02000603 RID: 1539
	public class StandaloneFileSystem : Object
	{
		// Token: 0x06009EF0 RID: 40688 RVA: 0x0028ADC4 File Offset: 0x00288FC4
		[CallerCount(3)]
		[CachedScanResults(RefRangeStart = 622899, RefRangeEnd = 622902, XrefRangeStart = 622875, XrefRangeEnd = 622899, MetadataInitTokenRva = 0L, MetadataInitFlagRva = 0L)]
		public unsafe StandaloneFileSystem(IReadOnlyList<string> dataPathGroups, string dataExtension = ".dat")
			: this(IL2CPP.il2cpp_object_new(Il2CppClassPointerStore<StandaloneFileSystem>.NativeClassPtr))
		{
			IntPtr* ptr;
			checked
			{
				ptr = stackalloc IntPtr[unchecked((UIntPtr)2) * (UIntPtr)sizeof(IntPtr)];
				*ptr = IL2CPP.Il2CppObjectBaseToPtr(dataPathGroups);
			}
			ptr[checked(unchecked((UIntPtr)1) * (UIntPtr)sizeof(IntPtr)) / (UIntPtr)sizeof(IntPtr)] = IL2CPP.ManagedStringToIl2Cpp(dataExtension);
			IntPtr intPtr2;
			IntPtr intPtr = IL2CPP.il2cpp_runtime_invoke(StandaloneFileSystem.NativeMethodInfoPtr__ctor_Public_Void_IReadOnlyList_1_String_String_0, IL2CPP.Il2CppObjectBaseToPtrNotNull(this), (void**)ptr, ref intPtr2);
			Il2CppException.RaiseExceptionIfNecessary(intPtr2);
		}

		// Token: 0x06009EF1 RID: 40689 RVA: 0x0028AE40 File Offset: 0x00289040
		[CallerCount(0)]
		[CachedScanResults(RefRangeStart = 0, RefRangeEnd = 0, XrefRangeStart = 622902, XrefRangeEnd = 622904, MetadataInitTokenRva = 0L, MetadataInitFlagRva = 0L)]
		public unsafe virtual bool HasFile(int fileGroup, string dataName)
		{
			IL2CPP.Il2CppObjectBaseToPtrNotNull(this);
			IntPtr* ptr;
			checked
			{
				ptr = stackalloc IntPtr[unchecked((UIntPtr)2) * (UIntPtr)sizeof(IntPtr)];
				*ptr = ref fileGroup;
			}
			ptr[checked(unchecked((UIntPtr)1) * (UIntPtr)sizeof(IntPtr)) / (UIntPtr)sizeof(IntPtr)] = IL2CPP.ManagedStringToIl2Cpp(dataName);
			IntPtr intPtr2;
			IntPtr intPtr = IL2CPP.il2cpp_runtime_invoke(StandaloneFileSystem.NativeMethodInfoPtr_HasFile_Public_Virtual_Final_New_Boolean_Int32_String_0, IL2CPP.Il2CppObjectBaseToPtrNotNull(this), (void**)ptr, ref intPtr2);
			Il2CppException.RaiseExceptionIfNecessary(intPtr2);
			return *IL2CPP.il2cpp_object_unbox(intPtr);
		}

		// Token: 0x06009EF2 RID: 40690 RVA: 0x0028AEBC File Offset: 0x002890BC
		[CallerCount(0)]
		[CachedScanResults(RefRangeStart = 0, RefRangeEnd = 0, XrefRangeStart = 622904, XrefRangeEnd = 622912, MetadataInitTokenRva = 0L, MetadataInitFlagRva = 0L)]
		public unsafe virtual WriteFileResult WriteFile(int fileGroup, string dataName, Il2CppStructArray<byte> data)
		{
			IL2CPP.Il2CppObjectBaseToPtrNotNull(this);
			IntPtr* ptr;
			checked
			{
				ptr = stackalloc IntPtr[unchecked((UIntPtr)3) * (UIntPtr)sizeof(IntPtr)];
				*ptr = ref fileGroup;
			}
			ptr[checked(unchecked((UIntPtr)1) * (UIntPtr)sizeof(IntPtr)) / (UIntPtr)sizeof(IntPtr)] = IL2CPP.ManagedStringToIl2Cpp(dataName);
			ptr[checked(unchecked((UIntPtr)2) * (UIntPtr)sizeof(IntPtr)) / (UIntPtr)sizeof(IntPtr)] = IL2CPP.Il2CppObjectBaseToPtr(data);
			IntPtr intPtr2;
			IntPtr intPtr = IL2CPP.il2cpp_runtime_invoke(StandaloneFileSystem.NativeMethodInfoPtr_WriteFile_Public_Virtual_Final_New_WriteFileResult_Int32_String_Il2CppStructArray_1_Byte_0, IL2CPP.Il2CppObjectBaseToPtrNotNull(this), (void**)ptr, ref intPtr2);
			Il2CppException.RaiseExceptionIfNecessary(intPtr2);
			return *IL2CPP.il2cpp_object_unbox(intPtr);
		}

		// Token: 0x06009EF3 RID: 40691 RVA: 0x0028AF50 File Offset: 0x00289150
		[CallerCount(0)]
		[CachedScanResults(RefRangeStart = 0, RefRangeEnd = 0, XrefRangeStart = 622912, XrefRangeEnd = 622915, MetadataInitTokenRva = 0L, MetadataInitFlagRva = 0L)]
		public unsafe virtual ReadFileResult ReadFile(int fileGroup, string dataName, out Il2CppStructArray<byte> data)
		{
			IL2CPP.Il2CppObjectBaseToPtrNotNull(this);
			IntPtr* ptr;
			checked
			{
				ptr = stackalloc IntPtr[unchecked((UIntPtr)3) * (UIntPtr)sizeof(IntPtr)];
				*ptr = ref fileGroup;
			}
			ptr[checked(unchecked((UIntPtr)1) * (UIntPtr)sizeof(IntPtr)) / (UIntPtr)sizeof(IntPtr)] = IL2CPP.ManagedStringToIl2Cpp(dataName);
			ref IntPtr ptr2 = ref ptr[checked(unchecked((UIntPtr)2) * (UIntPtr)sizeof(IntPtr)) / (UIntPtr)sizeof(IntPtr)];
			IntPtr intPtr = 0;
			ptr2 = &intPtr;
			IntPtr intPtr3;
			IntPtr intPtr2 = IL2CPP.il2cpp_runtime_invoke(StandaloneFileSystem.NativeMethodInfoPtr_ReadFile_Public_Virtual_Final_New_ReadFileResult_Int32_String_byref_Il2CppStructArray_1_Byte_0, IL2CPP.Il2CppObjectBaseToPtrNotNull(this), (void**)ptr, ref intPtr3);
			Il2CppException.RaiseExceptionIfNecessary(intPtr3);
			IntPtr intPtr4 = intPtr;
			data = ((intPtr4 == 0) ? null : new Il2CppStructArray(intPtr4));
			return *IL2CPP.il2cpp_object_unbox(intPtr2);
		}

		// Token: 0x06009EF4 RID: 40692 RVA: 0x0028AFFC File Offset: 0x002891FC
		[CallerCount(0)]
		[CachedScanResults(RefRangeStart = 0, RefRangeEnd = 0, XrefRangeStart = 622915, XrefRangeEnd = 622925, MetadataInitTokenRva = 0L, MetadataInitFlagRva = 0L)]
		public unsafe virtual void DeleteFile(int fileGroup, string dataName)
		{
			IL2CPP.Il2CppObjectBaseToPtrNotNull(this);
			IntPtr* ptr;
			checked
			{
				ptr = stackalloc IntPtr[unchecked((UIntPtr)2) * (UIntPtr)sizeof(IntPtr)];
				*ptr = ref fileGroup;
			}
			ptr[checked(unchecked((UIntPtr)1) * (UIntPtr)sizeof(IntPtr)) / (UIntPtr)sizeof(IntPtr)] = IL2CPP.ManagedStringToIl2Cpp(dataName);
			IntPtr intPtr2;
			IntPtr intPtr = IL2CPP.il2cpp_runtime_invoke(StandaloneFileSystem.NativeMethodInfoPtr_DeleteFile_Public_Virtual_Final_New_Void_Int32_String_0, IL2CPP.Il2CppObjectBaseToPtrNotNull(this), (void**)ptr, ref intPtr2);
			Il2CppException.RaiseExceptionIfNecessary(intPtr2);
		}

		// Token: 0x06009EF5 RID: 40693 RVA: 0x0028B068 File Offset: 0x00289268
		[CallerCount(4)]
		[CachedScanResults(RefRangeStart = 622933, RefRangeEnd = 622937, XrefRangeStart = 622925, XrefRangeEnd = 622933, MetadataInitTokenRva = 0L, MetadataInitFlagRva = 0L)]
		public unsafe string GetFilePath(int fileGroup, string fileName)
		{
			IL2CPP.Il2CppObjectBaseToPtrNotNull(this);
			IntPtr* ptr;
			checked
			{
				ptr = stackalloc IntPtr[unchecked((UIntPtr)2) * (UIntPtr)sizeof(IntPtr)];
				*ptr = ref fileGroup;
			}
			ptr[checked(unchecked((UIntPtr)1) * (UIntPtr)sizeof(IntPtr)) / (UIntPtr)sizeof(IntPtr)] = IL2CPP.ManagedStringToIl2Cpp(fileName);
			IntPtr intPtr2;
			IntPtr intPtr = IL2CPP.il2cpp_runtime_invoke(StandaloneFileSystem.NativeMethodInfoPtr_GetFilePath_Private_String_Int32_String_0, IL2CPP.Il2CppObjectBaseToPtrNotNull(this), (void**)ptr, ref intPtr2);
			Il2CppException.RaiseExceptionIfNecessary(intPtr2);
			return IL2CPP.Il2CppStringToManaged(intPtr);
		}

		// Token: 0x06009EF6 RID: 40694 RVA: 0x0028B0E0 File Offset: 0x002892E0
		// Note: this type is marked as 'beforefieldinit'.
		static StandaloneFileSystem()
		{
			Il2CppClassPointerStore<StandaloneFileSystem>.NativeClassPtr = IL2CPP.GetIl2CppClass("Assembly-CSharp.dll", "MarsSDK", "StandaloneFileSystem");
			IL2CPP.il2cpp_runtime_class_init(Il2CppClassPointerStore<StandaloneFileSystem>.NativeClassPtr);
			StandaloneFileSystem.NativeFieldInfoPtr_dataExtension = IL2CPP.GetIl2CppField(Il2CppClassPointerStore<StandaloneFileSystem>.NativeClassPtr, "dataExtension");
			StandaloneFileSystem.NativeFieldInfoPtr_pathGroups = IL2CPP.GetIl2CppField(Il2CppClassPointerStore<StandaloneFileSystem>.NativeClassPtr, "pathGroups");
			StandaloneFileSystem.NativeMethodInfoPtr__ctor_Public_Void_IReadOnlyList_1_String_String_0 = IL2CPP.GetIl2CppMethodByToken(Il2CppClassPointerStore<StandaloneFileSystem>.NativeClassPtr, 100675518);
			StandaloneFileSystem.NativeMethodInfoPtr_HasFile_Public_Virtual_Final_New_Boolean_Int32_String_0 = IL2CPP.GetIl2CppMethodByToken(Il2CppClassPointerStore<StandaloneFileSystem>.NativeClassPtr, 100675519);
			StandaloneFileSystem.NativeMethodInfoPtr_WriteFile_Public_Virtual_Final_New_WriteFileResult_Int32_String_Il2CppStructArray_1_Byte_0 = IL2CPP.GetIl2CppMethodByToken(Il2CppClassPointerStore<StandaloneFileSystem>.NativeClassPtr, 100675520);
			StandaloneFileSystem.NativeMethodInfoPtr_ReadFile_Public_Virtual_Final_New_ReadFileResult_Int32_String_byref_Il2CppStructArray_1_Byte_0 = IL2CPP.GetIl2CppMethodByToken(Il2CppClassPointerStore<StandaloneFileSystem>.NativeClassPtr, 100675521);
			StandaloneFileSystem.NativeMethodInfoPtr_DeleteFile_Public_Virtual_Final_New_Void_Int32_String_0 = IL2CPP.GetIl2CppMethodByToken(Il2CppClassPointerStore<StandaloneFileSystem>.NativeClassPtr, 100675522);
			StandaloneFileSystem.NativeMethodInfoPtr_GetFilePath_Private_String_Int32_String_0 = IL2CPP.GetIl2CppMethodByToken(Il2CppClassPointerStore<StandaloneFileSystem>.NativeClassPtr, 100675523);
		}

		// Token: 0x06009EF7 RID: 40695 RVA: 0x0000A688 File Offset: 0x00008888
		public StandaloneFileSystem(IntPtr pointer)
			: base(pointer)
		{
		}

		// Token: 0x170035F7 RID: 13815
		// (get) Token: 0x06009EF8 RID: 40696 RVA: 0x0028B1B0 File Offset: 0x002893B0
		// (set) Token: 0x06009EF9 RID: 40697 RVA: 0x0028B1D9 File Offset: 0x002893D9
		public unsafe string dataExtension
		{
			get
			{
				IntPtr intPtr = IL2CPP.Il2CppObjectBaseToPtrNotNull(this) + (IntPtr)IL2CPP.il2cpp_field_get_offset(StandaloneFileSystem.NativeFieldInfoPtr_dataExtension);
				return IL2CPP.Il2CppStringToManaged(*intPtr);
			}
			set
			{
				IntPtr intPtr = IL2CPP.Il2CppObjectBaseToPtrNotNull(this);
				IL2CPP.il2cpp_gc_wbarrier_set_field(intPtr, intPtr + (IntPtr)IL2CPP.il2cpp_field_get_offset(StandaloneFileSystem.NativeFieldInfoPtr_dataExtension), IL2CPP.ManagedStringToIl2Cpp(value));
			}
		}

		// Token: 0x170035F8 RID: 13816
		// (get) Token: 0x06009EFA RID: 40698 RVA: 0x0028B200 File Offset: 0x00289400
		// (set) Token: 0x06009EFB RID: 40699 RVA: 0x0028B234 File Offset: 0x00289434
		public unsafe Il2CppStringArray pathGroups
		{
			get
			{
				IntPtr intPtr = IL2CPP.Il2CppObjectBaseToPtrNotNull(this) + (IntPtr)IL2CPP.il2cpp_field_get_offset(StandaloneFileSystem.NativeFieldInfoPtr_pathGroups);
				IntPtr intPtr2 = *intPtr;
				return (intPtr2 != 0) ? new Il2CppStringArray(intPtr2) : null;
			}
			set
			{
				IntPtr intPtr = IL2CPP.Il2CppObjectBaseToPtrNotNull(this);
				IL2CPP.il2cpp_gc_wbarrier_set_field(intPtr, intPtr + (IntPtr)IL2CPP.il2cpp_field_get_offset(StandaloneFileSystem.NativeFieldInfoPtr_pathGroups), IL2CPP.Il2CppObjectBaseToPtr(value));
			}
		}

		// Token: 0x04006A71 RID: 27249
		private static readonly IntPtr NativeFieldInfoPtr_dataExtension;

		// Token: 0x04006A72 RID: 27250
		private static readonly IntPtr NativeFieldInfoPtr_pathGroups;

		// Token: 0x04006A73 RID: 27251
		private static readonly IntPtr NativeMethodInfoPtr__ctor_Public_Void_IReadOnlyList_1_String_String_0;

		// Token: 0x04006A74 RID: 27252
		private static readonly IntPtr NativeMethodInfoPtr_HasFile_Public_Virtual_Final_New_Boolean_Int32_String_0;

		// Token: 0x04006A75 RID: 27253
		private static readonly IntPtr NativeMethodInfoPtr_WriteFile_Public_Virtual_Final_New_WriteFileResult_Int32_String_Il2CppStructArray_1_Byte_0;

		// Token: 0x04006A76 RID: 27254
		private static readonly IntPtr NativeMethodInfoPtr_ReadFile_Public_Virtual_Final_New_ReadFileResult_Int32_String_byref_Il2CppStructArray_1_Byte_0;

		// Token: 0x04006A77 RID: 27255
		private static readonly IntPtr NativeMethodInfoPtr_DeleteFile_Public_Virtual_Final_New_Void_Int32_String_0;

		// Token: 0x04006A78 RID: 27256
		private static readonly IntPtr NativeMethodInfoPtr_GetFilePath_Private_String_Int32_String_0;
	}
}
