public static bool fileExists(string path, bool useCloud, bool usePath) { if (useCloud) { return(ReadWrite.cloudFileExists(path)); } if (usePath) { path = ReadWrite.PATH + path; } return(File.Exists(path)); }
public static byte[] cloudFileRead(string path) { if (!ReadWrite.cloudFileExists(path)) { return(null); } int num; Provider.provider.cloudService.getSize(path, out num); byte[] array = new byte[num]; if (!Provider.provider.cloudService.read(path, array)) { Debug.LogError("Failed to read the correct file size."); return(null); } return(array); }