Logo GenPRES

FilePath Module

Returns the paths of the data directory, the G-Standaard files and the cache files, and tells whether the demo cache files are used.

Functions and values

Function or value Description

GENPRES_PROD

Full Usage: GENPRES_PROD

Returns: string
Returns: string

GStandPath ()

Full Usage: GStandPath ()

Parameters:
    () : unit

Returns: string
() : unit
Returns: string

data ()

Full Usage: data ()

Parameters:
    () : unit

Returns: string

The base data directory, resolved by the unified AppPath resolver. A function, not a value: as a value this ran in this file's static constructor and forced AppPath's lazy root at whatever moment anything in FilePath was first touched — before an Env.loadDotEnv () could set GENPRES_ROOT, defeating the deferral documented at AppPath.fs. No cache is needed; AppPath.root is already lazy, so this is a Path.Combine and a concat.

() : unit
Returns: string

findDataDir startDir

Full Usage: findDataDir startDir

Parameters:
    startDir : string

Returns: string option

Find the data directory by searching up from the given starting directory The data directory must contain a 'zindex' subfolder to be valid

startDir : string
Returns: string option

findDataDirInternal startDir

Full Usage: findDataDirInternal startDir

Parameters:
    startDir : string

Returns: string option

Find the data directory by searching up from the given starting directory (internal for testing)

startDir : string
Returns: string option

getDataPathInternal currentDir assemblyPath

Full Usage: getDataPathInternal currentDir assemblyPath

Parameters:
    currentDir : string
    assemblyPath : string

Returns: string

Get the base data path (internal for testing) Parameters allow injecting different directory sources for testing. NOTE: this helper is retained only for the existing FilePath unit tests (it is no longer used at runtime — runtime paths go through AppPath). Its relative "./data" fallback is intentionally left unchanged to preserve the existing test contract and must not be "unified" with AppPath's CurrentDirectory fallback without updating those tests.

currentDir : string
assemblyPath : string
Returns: string

groupCache useDemo

Full Usage: groupCache useDemo

Parameters:
    useDemo : bool

Returns: string

Get the path to the Group cache file

useDemo : bool
Returns: string

productCache useDemo

Full Usage: productCache useDemo

Parameters:
    useDemo : bool

Returns: string

Get the path to the Product cache file

useDemo : bool
Returns: string

ruleCache useDemo

Full Usage: ruleCache useDemo

Parameters:
    useDemo : bool

Returns: string

Get the path to the Rule cache file

useDemo : bool
Returns: string

substanceCache useDemo

Full Usage: substanceCache useDemo

Parameters:
    useDemo : bool

Returns: string

Get the path to the Substance cache file

useDemo : bool
Returns: string

useDemo ()

Full Usage: useDemo ()

Parameters:
    () : unit

Returns: bool

Check whether the demo version of the cache files should be used.

() : unit
Returns: bool

Type something to start searching.