@salesforce/b2c-tooling-sdk / cartridges / CartridgeFileSystemHost
Interface: CartridgeFileSystemHost
Defined in: packages/b2c-tooling-sdk/src/cartridges/host.ts:15
Synchronous filesystem access used by the cartridge resolver and discovery.
Hosts are injectable so the same logic can run inside environments that own their own filesystem view, such as the TypeScript language service (ts.sys), or against an in-memory tree in tests.
Properties
useCaseSensitiveFileNames
useCaseSensitiveFileNames:
boolean
Defined in: packages/b2c-tooling-sdk/src/cartridges/host.ts:26
Whether path comparisons are case-sensitive. When false, cartridge ownership checks fold case; filesystem probes always use the original case.
Methods
fileExists()
fileExists(
filePath):boolean
Defined in: packages/b2c-tooling-sdk/src/cartridges/host.ts:17
Returns true when filePath exists and is a file. Must not throw.
Parameters
filePath
string
Returns
boolean
getDirectories()
getDirectories(
dirPath): readonlystring[]
Defined in: packages/b2c-tooling-sdk/src/cartridges/host.ts:21
Returns the names (not paths) of the immediate subdirectories of dirPath. Must not throw.
Parameters
dirPath
string
Returns
readonly string[]
readFile()
readFile(
filePath):string|undefined
Defined in: packages/b2c-tooling-sdk/src/cartridges/host.ts:19
Returns the file's UTF-8 contents, or undefined if it cannot be read. Must not throw.
Parameters
filePath
string
Returns
string | undefined