Reply To: Saving files

HomeForumsMonoBrick EV3 FirmwareSaving filesReply To: Saving files

Author Image
Simon Stochholm

I need it for saving settings, so that I can read those settings if the ev3 has been turned off. I have tried the following ways:
1) private static string path = Path.GetDirectoryName(Assembly.GetAssembly(typeof(AbstractMemory)).CodeBase);
2) static string filePath = “/home/root/apps/test.dat”;
3) static DirectoryInfo di = new DirectoryInfo(Path.GetDirectoryName(System.Reflection.Assembly.GetExecutingAssembly().Location));
4)private static string filePath = “test.dat”;
5)private static string filePath = Path.Combine(Environment.CurrentDirectory, “test.dat”);
But none of them seems to work for me.

Can anyone give a good example of saving to a file on the ev3, or just the correct way to find the correct path to save the file

Posted in

Make a donation