Skip to main content

non-volatile storage

Please note these java.net forums are being decommissioned and use the new and improved forums at https://community.oracle.com/community/java.
1 reply [Last post]
tgwozdz
Offline
Joined: 2009-06-23

I'm trying to find a place where I can store a log file from within the MPE layer. There is a function called mpeos_filesysGetDefaultDir which returns the default path for the RI. I'm assuming I can write to some sub-directory there? Is there a document somewhere that describes the layout of this directory structure, and where a safe place to place a log file may be?
I'm assuming that there's some path within the default dir that maps to the non-volatile storage of the device, whether this is flash or a hard disk (DVR)... is this true?
Thanks!

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
greg80303
Offline
Joined: 2008-07-03

The implementation of mpeos_filesysGetDefaultDir is provided by your porting code, so it returns whatever you want it to. In the end, the MPEOS port defines everything about the local filesystem. MPE is platform-independent code, so it doesn't create files on its own since it can't even assume that NV storage is available. The stack doesn't assume any particular root directory structure. When you register your MPEOS filesystems (in mpeos_filesysInit()), you tell the stack what the mount point is for each filesystem. So, in the end, you may write files anywhere your native filesystem allows by using the mpeos_file* APIs.
G