Resources | Resources |



Accessing files or functions in the Brew MP file system

The Brew MP file system is an embedded file systems (EFS), and there are several differences in the behavior of an EFS versus a file system on a desktop (for example, Windows XP). Applications must adhere to the following guidelines when trying to access files or functions in the Brew MP file system:

  • When specifying the path for a file, do not include the drive letter. There is no concept of drives in the Brew MP file system and they are not supported on the Simulator. For example, the following call is invalid:
     IFileSystem2_Open (pIFileSystem2, FS_CAP_CREATE, 
       "C:\Test.dat" ,_OFM_CREATE, &pIFilePort);
  • Calling IFileSystem2_Open() creates the intermediate directories if they do not exist and if the file open mode is specified as FS_CAP_CREATE; for example:
    IFileSystem2_ Open (pIFileSystem2,
       "fs:/~0x0100F00D/Test1/Test2/Test.dat", FS_CAP_RDWR FS_CAP_CREATE, 
    This function call creates the subdirectories Test1 and Test1/Test2, and then creates the file Test.dat within Test2. These subdirectories and file are created within the directory of the applet with the ClassID 0x0100F00D.
  • When converting applications from IFileMgr to IFileSystem2, be aware that IFileSystem2 file name resolution does not support unqualified names such as, nor does IFileSystem2 support fs:/~/ For these cases, use the application ClassID, such as fs:/~0xdeadbeef/ Applications can call IFSPathResolve_CanonicalizePath() to convert a path to an absolute path.