¿ªÔÆÌåÓý

ctrl + shift + ? for shortcuts
© 2025 Groups.io

How to store files on VC4?


 

Hi All,

with ordinary processors we use NVRAM or RM to store information.
What do we do when dealing with VC4?
Which path to use and which permissions?
Thanks.


 

I have been writing info to files in the /USER directory.?


 

I think I was trying USER folder with no success((
Can you share some example of the full path??


 

Are you doing a path combine to the ApplicationRootDirectory followed by User/ your file. ??


 
Edited

I use GetApplicationRootDirectory to create my path URL. That way it doesn't matter where the code runs, the path is always correct.

From the help file...
? ? ? ? // Summary:
? ? ? ? //? ? ?Returns the application's 'root' directory. This is where NVRAM and HTML folders
? ? ? ? //? ? ?can be found. No trailing directory separator at the end.
? ? ? ? //
? ? ? ? // Returns:
? ? ? ? //? ? ?The path of this applications 'root' as a string. For appliances, this would
? ? ? ? //? ? ?be ""; for servers, this would be the "{HOME}/RunningPrograms/RoomName".
?

string FileName = "NameOfFile";
string FilePath = Path.Combine(Directory.GetApplicationRootDirectory(), $@"User");
if (!Directory.Exists(FilePath))
{
? ? Directory.CreateDirectory(FilePath);
}
string FileURL = Path.Combine(FilePath, FileName);
ErrorLog.Notice($"File URL = {FileURL}");
if (File.Exists(FileURL))
{
? ? // Do stuff if the file is found
}

I hope this helps.


 

This worked for me.
Thanks a lot!


 

Are you doing this is Simpl# or Simpl+


Thank you
Jon