Resources | developer.brewmp.com Resources | developer.brewmp.com

Developer

resources

Differences between IFileSystem2/IFilePort1 and IFileMgr/IFile

The IFileSystem2 / IFilePort1 and IFileMgr / IFile interfaces provide similar functionality. Both sets of interfaces provide the following features:

  • Ability to resolve the Brew MP file namespace shortcuts "fs:/~/..." and "fs:/~<clsid>/" to absolute canonical "fs:/" paths
  • Support for the legacy namespace:
    • /Shared
    • /ringers
    • /addrbk
  • Ability to keep track of files that are in use.

    The functionality provided by IFILEMGR_UnUse() and IFILEMGR_Use() is provided by IFilePort1. If any application has an instance of IFilePort1 corresponding to a file, the file will not be deleted.

When converting applications from IFileMgr to IFileSystem2, be aware that IFileSystem2 file name resolution does not support unqualified names such as app.bar, nor does IFileSystem2 support fs:/~/app.bar. Applications can call IFSPathResolve_CanonicalizePath() to convert a path to an absolute path or use the application ClassID, such as fs:/~0xdeadbeef/app.bar.

IFileSystem2 and IFilePort1 provide the follow additional functionality:

  • Checking the filepath for accessibility
  • Directory renaming
  • Seeking to a 64-bit file offset
  • Getting and setting the last access time or last modification time for a file or directory

Note: The ability to set the file description and the ability to set the size of the buffer for file-caching, which were provided by IFileMgr/IFile, are not provided by IFileSystem2/IFilePort1.