Skip to Main Content

BTD_Mod_Helper​.Api​.Helpers​.FileIOHelper


BloonsTD6 Mod Helper

BTD_Mod_Helper.Api.Helpers

FileIOHelper Class

Class replacing the original functionality of FileIOUtil before BTD6 update 33.0

public static class FileIOHelper

Inheritance System.Object  FileIOHelper

Fields

FileIOHelper.Settings Field

JSON Serializer settings used for methods in this class

public static readonly JsonSerializerSettings Settings;

Field Value

Il2CppNewtonsoft.Json.JsonSerializerSettings

Properties

FileIOHelper.sandboxRoot Property

Same as the original FileIOUtil.sandboxRoot, INCLUDES A SLASH AT THE END

public static string sandboxRoot { get; }

Property Value

System.String

Methods

FileIOHelper.GetSandboxPath() Method

Same as the original FileIOUtil.GetSandboxPath(), INCLUDES A SLASH AT THE END

public static string GetSandboxPath();

Returns

System.String

FileIOHelper.LoadFile(string) Method

Same as the original FileIOUtil.LoadFile

public static string LoadFile(string fileName);

Parameters

fileName System.String

File name within the sandbox directory

Returns

System.String

FileIOHelper.LoadObject(string) Method

Same as the original FileIOUtil.LoadObject

public static T LoadObject<T>(string fileName)
    where T : Object;

Type parameters

T

Parameters

fileName System.String

File name within the sandbox directory

Returns

T

FileIOHelper.SaveFile(string, string) Method

Same as the original FileIOUtil.SaveFile

public static void SaveFile(string fileName, string text);

Parameters

fileName System.String

File name within the sandbox directory

text System.String

Text file contents to save

FileIOHelper.SaveObject(string, Object) Method

Saves an il2cpp object directly to the sandbox path like the original FileIOUtil.SaveObject


Will also create subdirectories as needed to save the file

public static void SaveObject(string fileName, Object data);

Parameters

fileName System.String

Name of file, extension included

data Il2CppSystem.Object

To learn how to download BTD Mod Helper and install mods, click here