File IDs

File IDs are used by some system components (e.g., NFS sharing) and third-party applications as an alternative to file names. IDs associated with files must be unique within a filesystem and should not change over time.

The root directory (\) always uses the predefined ID 0x7FFFFFFFFFFFFFFF.

For proper File ID support, an application must do all of the following:

  • enable the UseFileIds config setting;
  • create a mounting point with either STGMP_NETWORK or STGMP_MOUNT_MANAGER flag;
  • return File IDs during directory enumeration and retrieval of file information;
  • handle the GetFileNameByFileId event and return the appropriate file name and path.

If an ID, returned during directory enumeration, is 0, the class will generate an ID. This generated ID is not guaranteed to be unique, especially under heavy load. FileIDs, including the generated ones, are kept in the metadata cache. If the metadata cache is disabled and IDs are not provided by an application, the driver will fail to provide proper File IDs and open files by ID, which can prevent operations of components and applications that rely on File ID support.

Copyright (c) 2022 Callback Technologies, Inc. - All rights reserved.
CBFS Connect 2020 Qt Edition - Version 20.0 [Build 8348]