/// <summary> /// Parses a file from the database /// </summary> /// <param name="name">The name of the file to parse</param> /// <param name="device">The device this file is on</param> public static Data[] ParseFile(string name, IDevice device) { File file = FileDatabase.LoadFile(device, name); //Loads the file from the database Data[] data = GetParser(file).ParseFile(file); // Finds the parser and parses the file return(data); }
private void Awake() { DeviceHelper.RegisterDevice(id, this); fileNames = FileDatabase.AddFiles(assets, this); //Add the files to the database fileData = FileHelper.ParseFiles(fileNames, this); //Parse he files and save them in the filedata var data = ((ConnectionsData)fileData.GetData(DataType.Connections)); if (data == null) { return; } foreach (string connection in data.connections) { print(connection); } }
public void SaveFile(File file, IDevice device) { FileDatabase.SaveFile(file, device); }
public static File?LoadFile(IDevice device, string name) { return(FileDatabase.LoadFile(device, name)); }