public static void PrepareCacheDirectory(Il2CppNativeCodeBuilder builder, string currentEditorVersion) { string path = Il2CppNativeCodeBuilderUtils.CacheDirectoryPathFor(builder.CacheDirectory); Directory.CreateDirectory(path); string path2 = Path.Combine(builder.CacheDirectory, Il2CppNativeCodeBuilderUtils.EditorVersionFilenameFor(currentEditorVersion)); if (!File.Exists(path2)) { File.Create(path2).Dispose(); } }
public static void ClearCacheIfEditorVersionDiffers(Il2CppNativeCodeBuilder builder, string currentEditorVersion) { string path = Il2CppNativeCodeBuilderUtils.CacheDirectoryPathFor(builder.CacheDirectory); if (Directory.Exists(path)) { if (!File.Exists(Path.Combine(builder.CacheDirectory, Il2CppNativeCodeBuilderUtils.EditorVersionFilenameFor(currentEditorVersion)))) { Directory.Delete(path, true); } } }