using System;
using Il2CppInterop.Common.Attributes;
using Il2CppInterop.Runtime;
using Il2CppSystem;

namespace MTAssets.UltimateLODSystem.MeshSimplifier
{
	// Token: 0x02000682 RID: 1666
	public static class IOUtils : Object
	{
		// Token: 0x0600A9BD RID: 43453 RVA: 0x002B9A48 File Offset: 0x002B7C48
		[CallerCount(0)]
		[CachedScanResults(RefRangeStart = 0, RefRangeEnd = 0, XrefRangeStart = 658201, XrefRangeEnd = 658236, MetadataInitTokenRva = 0L, MetadataInitFlagRva = 0L)]
		public unsafe static string MakeSafeRelativePath(string path)
		{
			checked
			{
				IntPtr* ptr = stackalloc IntPtr[unchecked((UIntPtr)1) * (UIntPtr)sizeof(IntPtr)];
				*ptr = IL2CPP.ManagedStringToIl2Cpp(path);
				IntPtr intPtr2;
				IntPtr intPtr = IL2CPP.il2cpp_runtime_invoke(IOUtils.NativeMethodInfoPtr_MakeSafeRelativePath_Internal_Static_String_String_0, 0, (void**)ptr, ref intPtr2);
				Il2CppException.RaiseExceptionIfNecessary(intPtr2);
				return IL2CPP.Il2CppStringToManaged(intPtr);
			}
		}

		// Token: 0x0600A9BE RID: 43454 RVA: 0x002B9A9C File Offset: 0x002B7C9C
		[CallerCount(0)]
		[CachedScanResults(RefRangeStart = 0, RefRangeEnd = 0, XrefRangeStart = 658236, XrefRangeEnd = 658253, MetadataInitTokenRva = 0L, MetadataInitFlagRva = 0L)]
		public unsafe static string MakeSafeFileName(string name)
		{
			checked
			{
				IntPtr* ptr = stackalloc IntPtr[unchecked((UIntPtr)1) * (UIntPtr)sizeof(IntPtr)];
				*ptr = IL2CPP.ManagedStringToIl2Cpp(name);
				IntPtr intPtr2;
				IntPtr intPtr = IL2CPP.il2cpp_runtime_invoke(IOUtils.NativeMethodInfoPtr_MakeSafeFileName_Internal_Static_String_String_0, 0, (void**)ptr, ref intPtr2);
				Il2CppException.RaiseExceptionIfNecessary(intPtr2);
				return IL2CPP.Il2CppStringToManaged(intPtr);
			}
		}

		// Token: 0x0600A9BF RID: 43455 RVA: 0x002B9AF0 File Offset: 0x002B7CF0
		// Note: this type is marked as 'beforefieldinit'.
		static IOUtils()
		{
			Il2CppClassPointerStore<IOUtils>.NativeClassPtr = IL2CPP.GetIl2CppClass("Assembly-CSharp.dll", "MTAssets.UltimateLODSystem.MeshSimplifier", "IOUtils");
			IL2CPP.il2cpp_runtime_class_init(Il2CppClassPointerStore<IOUtils>.NativeClassPtr);
			IOUtils.NativeMethodInfoPtr_MakeSafeRelativePath_Internal_Static_String_String_0 = IL2CPP.GetIl2CppMethodByToken(Il2CppClassPointerStore<IOUtils>.NativeClassPtr, 100676511);
			IOUtils.NativeMethodInfoPtr_MakeSafeFileName_Internal_Static_String_String_0 = IL2CPP.GetIl2CppMethodByToken(Il2CppClassPointerStore<IOUtils>.NativeClassPtr, 100676512);
		}

		// Token: 0x0600A9C0 RID: 43456 RVA: 0x0000A74C File Offset: 0x0000894C
		public IOUtils(IntPtr pointer)
			: base(pointer)
		{
		}

		// Token: 0x04007207 RID: 29191
		private static readonly IntPtr NativeMethodInfoPtr_MakeSafeRelativePath_Internal_Static_String_String_0;

		// Token: 0x04007208 RID: 29192
		private static readonly IntPtr NativeMethodInfoPtr_MakeSafeFileName_Internal_Static_String_String_0;
	}
}
