UseCaseSensitiveFileNames Property
Whether the virtual filesystem is case-sensitive, or just case-preserving.
Syntax
public boolean isUseCaseSensitiveFileNames(); public void setUseCaseSensitiveFileNames(boolean useCaseSensitiveFileNames);
Default Value
False
Remarks
This property specifies whether the virtual filesystem should indicate to the system that it is case-sensitive (true) or just case-preserving (false; default).
Traditionally, Windows uses a case-insensitive filesystem architecture. However, the NTFS filesystem has a case-sensitive mode in order to support a POSIX subsystem; enabling this property will make the class behave in a manner similar to NTFS with regards to case-sensitivity by doing the following:
- Informing Windows that it supports preserving filename casing (which the application must actually do in its code).
- Working in a case-sensitive manner when managing caches.
- Firing the GetFileInfo event to obtain a real filename if a mixed-case name is encountered.
In addition to enabling this property, a flag must be set in the registry in order for case-sensitive filename support to work. Specifically, in the HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Session Manager\kernel registry key, the DWORD obcaseinsensitive must be set to 0.
Note that the class always attempts to work with case-sensitive filenames, regardless of how this property is set. When a file is being opened, the CBFS Connect driver looks for the file's name in its metadata cache; if an exact match isn't found there, the GetFileInfo event is fired to give the application a chance to supply a corrected filename via the RealFileName parameter. If the application chooses not to do so, the case-insensitive name will be used.
Note: This property cannot be changed when Active is true, and cannot be changed within events.