LogFileRead
procedure LogFileRead(const aFilePath: string)
Example
procedure ScriptEvent(var Value: variant);
begin
// Call after your code has actually read the governed file.
LogFileRead('C:\VeloxData\Reference\customer-codes.csv');
end;
Usage
LogFileRead queues a Read file-audit record for a path in the current flow log without opening or verifying the file.
Parameters
| Name | Type | Description |
|---|---|---|
aFilePath | string, const | Lexical file path to record. Empty, relative, nonexistent and malformed path text is accepted unless path parsing itself raises. |
Errors
Construction/parsing exceptions are caught by the helper, which adds an Error log item and returns nil; LogFileRead exposes no result. Later database-save failures are handled separately by the log subsystem. The procedure does not report an invalid/nonexistent file because it never checks one.
Additional Technical Info
LogFileRead queues a path-only file-audit item with native event fetRead. It is an assertion supplied by the script, not an I/O operation: Velox does not open the path, check that it exists or prove it was read.
Call it only after the relevant code has successfully completed the read you want the log to represent. The example is fictional and source-reviewed and did not access a file.
Implementation trace
TvxScripter.LogFileReadcallsCreateLogFileEventFromPath(aFilePath, fetRead)with the native Read value.- The helper creates a
TvxLogFileunder the current log and copies its Test flag. ExtractFileNamestores the rightmost filename component.ExtractFilePathstores the drive/directory text including its trailing separator.ExtractFileExtreads the final extension and Velox removes its leading dot.- The event is set to native
fetRead.
No bytes are read. FileHash, FileData, File Connection/Definition identifiers and transport identity remain empty.
Path semantics
Parsing is lexical and Windows-hosted. Velox does not:
- resolve a relative path against a stable base;
- normalize
.or..segments; - expand environment variables;
- resolve links or canonical casing;
- reject wildcards, directory-only text or alternate stream syntax; or
- capture a stable file identity.
Record the exact governed path form your operational processes expect. Two different strings for the same physical file remain different audit entries.
Deferred persistence
The item exists only in the current flow log until that master log is saved. Persistence creates VX_LOG_FILE and VX_LOG_FILE_LINK rows. If the final log status is not configured for saving, no durable read record is produced.
Repeated calls are not deduplicated. A recorded Read event is not proof that content was read completely, successfully, once, or before a concurrent replacement.
Related entries
LogFileWriterecords Write and has a Test-log deletion hazard.LogFileDownloadrecords the native Downloaded event.LogFileEventhas a shifted-enum defect for events after Write.TvxFileEventTypedefines the script constants.
External references
Created 2026-07-15