CBFS Connect 2020 Node.js Edition

Questions / Feedback?

UseCaseSensitiveFileNames Property

Whether the virtual filesystem is case-sensitive, or just case-preserving.

Syntax

 cbfs.getUseCaseSensitiveFileNames([callback])
 cbfs.setUseCaseSensitiveFileNames( useCaseSensitiveFileNames, [callback])

Default Value

FALSE

Callback

The 'callback' parameter specifies a function which will be called when the operation completes (or an error is encountered). If the 'callback' parameter is not specified, then the method will block and will not return until the operation completes (or an error is encountered).

The callback for the getUseCaseSensitiveFileNames([callback]) method is defined as:

function(err, data){ }

'err' is the error that occurred. If there was no error, then 'err' is 'null'.

'data' is the value returned by the method.

The callback for the setUseCaseSensitiveFileNames([callback]) method is defined as:

function(err){ }

'err' is the error that occurred. If there was no error, then 'err' is 'null'.

'err' has 2 properties which hold detailed information:

err.code
err.message

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.

Data Type

Boolean

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