AppDataCertificatePath
Function AppDataCertificatePath : string
Example
procedure ScriptEvent(var Value: variant);
begin
Value := AppDataCertificatePath + 'partner-ca.pem';
end;
Usage
AppDataCertificatePath returns the shared Velox Certificate directory, creating the directory tree when it is missing.
Additional Technical Info
AppDataCertificatePath returns the machine-wide directory in which Velox certificate material is stored.
For the default installation the result is normally C:\ProgramData\Velox\Certificate\. The result includes a trailing backslash.
Implementation and side effects
The PascalScript import calls vxConfigPath.AppDataCertificatePath, which calls GetAppDataPath('Certificate\'). GetAppDataPath appends that literal folder to the cached AppDataPath, checks whether the resulting directory exists, and calls Delphi's ForceDirectories when it does not.
Reading this value can therefore touch the filesystem and attempt to create directories. Velox serializes the path check and creation with its process-wide path critical section. It ignores the Boolean result from ForceDirectories, so a returned string does not prove the directory now exists or is writable. Any exception that is raised propagates to the script.
The directory is shared by Designer and service processes that resolve the same application-data root. Do not put private keys directly in this parent merely because its name mentions certificates; use AppDataPrivateCertPath and apply operating-system permissions appropriate to secrets.
Related entries and official references
AppDataPrivateCertPathandAppDataPublicCertPathappend the designated child folder names.- Embarcadero: ForceDirectories
- Free Pascal: ForceDirectories (compatibility reference; Velox executes Delphi RTL)