Table of Contents

Class FileUtil

Namespace
KSP.Networking.MP.Utils
Assembly
Assembly-CSharp.dll
public static class FileUtil
Inheritance
FileUtil
Inherited Members

Methods

ClearFirstTimeFlag(string)

public static void ClearFirstTimeFlag(string fileFullPath)

Parameters

fileFullPath string

DeleteFile(string)

public static bool DeleteFile(string fullpath)

Parameters

fullpath string

Returns

bool

EmptyDirectory(string)

public static bool EmptyDirectory(string directory)

Parameters

directory string

Returns

bool

EnsureDirectoryExists(string)

public static bool EnsureDirectoryExists(string directory)

Parameters

directory string

Returns

bool

EnsureParentDirectoryExists(string)

public static bool EnsureParentDirectoryExists(string fullpath)

Parameters

fullpath string

Returns

bool

FixFullPath(ref string)

public static bool FixFullPath(ref string fullPath)

Parameters

fullPath string

Returns

bool

GetFileLockObject(string)

public static object GetFileLockObject(string fullpath)

Parameters

fullpath string

Returns

object

GetFullPathKey(string)

public static string GetFullPathKey(string fullPath)

Parameters

fullPath string

Returns

string

GetListOfFilesInDirectory(string)

public static List<string> GetListOfFilesInDirectory(string directory)

Parameters

directory string

Returns

List<string>

GetPersistentDataFilesDirectoryPrefix()

public static string GetPersistentDataFilesDirectoryPrefix()

Returns

string

GetPersistentFilesDirectoryPrefix()

public static string GetPersistentFilesDirectoryPrefix()

Returns

string

GetTempLogFilesDirectoryPrefix()

public static string GetTempLogFilesDirectoryPrefix()

Returns

string

IsFirstTime(string)

public static bool IsFirstTime(string fullPath)

Parameters

fullPath string

Returns

bool

LoadFileAsString(string, ref string, string)

public static bool LoadFileAsString(string fullpath, ref string stringValueRef, string defaultValue)

Parameters

fullpath string
stringValueRef string
defaultValue string

Returns

bool

LoadStringToUnityPlayerPrefs(string, ref string, string)

public static bool LoadStringToUnityPlayerPrefs(string key, ref string stringValueRef, string defaultValue)

Parameters

key string
stringValueRef string
defaultValue string

Returns

bool

LogLineToFile(string, string)

public static void LogLineToFile(string fullPath, string line)

Parameters

fullPath string
line string

PrepForFirstTimeNewFile(string)

public static bool PrepForFirstTimeNewFile(string fullpath)

Parameters

fullpath string

Returns

bool

SaveStringToFile(string, string)

public static bool SaveStringToFile(string fullpath, string stringValue)

Parameters

fullpath string
stringValue string

Returns

bool

SaveStringToUnityPlayerPrefs(string, string)

public static bool SaveStringToUnityPlayerPrefs(string key, string stringValue)

Parameters

key string
stringValue string

Returns

bool

SetPersistentDataFilesDirectoryPrefix(string)

public static void SetPersistentDataFilesDirectoryPrefix(string persistentDataFilesDirectoryPrefix)

Parameters

persistentDataFilesDirectoryPrefix string

SetPersistentFilesDirectoryPrefix(string)

public static void SetPersistentFilesDirectoryPrefix(string persistentLogFilesDirectoryPrefix)

Parameters

persistentLogFilesDirectoryPrefix string

SetTempLogFilesDirectoryPrefix(string)

public static void SetTempLogFilesDirectoryPrefix(string tempLogFilesDirectoryPrefix)

Parameters

tempLogFilesDirectoryPrefix string

WriteLineToFile(string, bool, Encoding, string)

public static bool WriteLineToFile(string fullPath, bool append, Encoding encoding, string str)

Parameters

fullPath string
append bool
encoding Encoding
str string

Returns

bool

WriteLineToFile(string, string)

public static bool WriteLineToFile(string fullPath, string str)

Parameters

fullPath string
str string

Returns

bool