Discuss this help topic in CBFS Forum

CallbackFileSystem.CaseSensitiveFileNames property


Pascal    C++ (Lib)    C++ (VCL)    C++ (.NET)    C#    VB.NET    Java 

CallbackFileSystem     See also    


Specifies whether the filesystem is case-sensitive or case-preserving.


    property CaseSensitiveFileNames : boolean;

[C++ (Lib)]
    bool GetCaseSensitiveFileNames();
    void SetCaseSensitiveFileNames(BOOL Value);

[C++ (VCL)]
    bool CaseSensitiveFileNames;

[C++ (.NET)]
    bool CaseSensitiveFileNames;

    bool CaseSensitiveFileNames;

    Public Property CaseSensitiveFileNames As Boolean

    boolean getCaseSensitiveFileNames();
    void setCaseSensitiveFileNames(boolean value)


Use this property to tell the driver whether it should represent a case-sensitive (when the value of the property is true) or case-preserving (when the value of the property is false) filenames.

By default Windows uses case-insensitive filesystem architecture. However to support POSIX subsystem Windows has case-sensitive mode in NTFS. This property makes CBFS behave in a way similar to NTFS in regards to case-sensitivity.

When case-sensitive mode is on, the driver

  1. tells Windows that it supports preserving filename case (and your code must actually do this);
  2. works in case-sensitive and case-preserving manner when managing caches;
  3. in particular sends OnGetFileInfo requests asking for a real filename, when case is mixed

In addition to this property to support case sensitive file names you need to set a special flag in the registry. You will find information about this flag in this MSDN article.

CBFS always tries to work with case sensitive file names, not depending whether CaseSensitiveFileNames is set or not. I.e. when a file is being opened, CBFS driver looks for the name in its metadata cache and if it isn't found there, then the driver calls the OnGetFileInfo callback, and you can return the corrected file name by means of the RealFileName parameter, and this file name will be used for the file. Of course, if CBFS doesn't find the exact match of the file name, then the case insensitive name can be used.

See also

GetFileInfo event    

Discuss this help topic in CBFS Forum