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

namespace MTAssets.UltimateLODSystem.MeshSimplifier
{
	// Token: 0x0200062A RID: 1578
	public static class IOUtils : Object
	{
		// Token: 0x0600A16A RID: 41322 RVA: 0x00296D0C File Offset: 0x00294F0C
		[CallerCount(0)]
		[CachedScanResults(RefRangeStart = 0, RefRangeEnd = 0, XrefRangeStart = 625903, XrefRangeEnd = 625938, 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: 0x0600A16B RID: 41323 RVA: 0x00296D60 File Offset: 0x00294F60
		[CallerCount(0)]
		[CachedScanResults(RefRangeStart = 0, RefRangeEnd = 0, XrefRangeStart = 625938, XrefRangeEnd = 625955, 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: 0x0600A16C RID: 41324 RVA: 0x00296DB4 File Offset: 0x00294FB4
		// 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, 100675798);
			IOUtils.NativeMethodInfoPtr_MakeSafeFileName_Internal_Static_String_String_0 = IL2CPP.GetIl2CppMethodByToken(Il2CppClassPointerStore<IOUtils>.NativeClassPtr, 100675799);
		}

		// Token: 0x0600A16D RID: 41325 RVA: 0x0000A688 File Offset: 0x00008888
		public IOUtils(IntPtr pointer)
			: base(pointer)
		{
		}

		// Token: 0x04006C5E RID: 27742
		private static readonly IntPtr NativeMethodInfoPtr_MakeSafeRelativePath_Internal_Static_String_String_0;

		// Token: 0x04006C5F RID: 27743
		private static readonly IntPtr NativeMethodInfoPtr_MakeSafeFileName_Internal_Static_String_String_0;
	}
}
