AppDataDataPath
Function AppDataDataPath : string
Example
procedure ScriptEvent(var Value: variant);
begin
Value := AppDataDataPath + 'ReferenceData.json';
end;
Usage
AppDataDataPath returns the shared Velox Data directory and attempts to create it when absent.
Additional Technical Info
AppDataDataPath returns the Data\ subdirectory of Velox's shared application-data root.
The default installation normally produces C:\ProgramData\Velox\Data\. The string ends in a backslash so it can be concatenated with a filename.
Implementation and behaviour
The PascalScript binding calls vxConfigPath.AppDataDataPath, which is a one-line call to GetAppDataPath('Data\'). The helper checks the composed directory and invokes ForceDirectories when necessary under a process-local critical section.
This path is application file storage and is unrelated to the VxData database or the script's DATA_* datasets. The function does not connect to a database, choose a transaction, create a file or validate a filename. Designer, VeloxService and VeloxAPIService can share the directory when configured to use the same application-data root.
The lookup can perform filesystem I/O and directory creation. Since Velox ignores ForceDirectories' return value, the path can be returned even after a non-exceptional creation failure. File operations must handle missing-directory, permission, sharing and disk errors themselves.
Related entries and official references
AppDataFilePathis the separate general file area.AppDataPathexplains how the root is resolved.- Embarcadero: ForceDirectories
- Free Pascal: ForceDirectories (compatibility reference)