This header file provides the functions declarations (prototypes) of the set of APIs regarding the management of M2M File System.
Some parameters of m2m_fs_xx(…) functions need full path having drive and separators, for example: "A:\user1\goofy". The table below shows the drives supported by the modules.
Drives |
Notes | |
A: (default) |
FLASH_DISK |
Maximum 8 files could be simultaneously opened on FLASH volume |
B: |
RAM_DISK |
Maximum 2 files could be simultaneously opened on RAM volume |
As described in the next pages, use m2m_fs_create(...) API to create a file and its directory, if missing. Here are some examples of paths, valid separators are / and \\.
m2m_fs_create("B:/temp1/dummy/file1"); /* use B: at the beginning of the string if you do not
want to use default drive A: */
m2m_fs_create("nav/APP/app1.bin"); /* equivalent of "A:\\ nav/APP/app1.bin" */
m2m_fs_create( "B:/temp2/dummy/file2" );
m2m_fs_create( "nav/APP/app2.bin" );
m2m_fs_create( "B:/temp3\\file3" ); /* equivalent of "B:\\temp3\\file3" */
m2m_fs_create( "C:/goofy" ); /* C: doesn't exist, invalid drive */
The table below shows the maximum lengths (characters) of the file names, directory names and full paths.
max length of the file name |
max length of the directory name |
max length of the full path including characters as A:\\ |
63 |
63 |
128 |