Skip to main content

FileCon

property FileCon: TvxFileCon read;

Example

procedure RequireFileConnection(const Data: TvxFileDef);
begin
if Data.FileCon = nil then
raise Exception.Create('No file-connection object is available');
{ The object can still be unloaded; use it only in the configured flow context. }
end;

Usage

FileCon returns the data definition's owned file-connection object, which exists before and independently of a successful configured-module load.

  • Use this property within a flow whose File Definition has already been opened/configured by Velox.
  • Where available, inspect ModuleLoaded and the required path/property values rather than treating non-nil as load proof.
  • File operations through the returned object have their documented filesystem and logging effects.

Additional Technical Info

FileCon exposes the TvxFileCon object owned by a data definition. It is most relevant to file definitions; database-only definitions can still own the base object.

Source-backed behaviour

TvxDataDef.Create constructs FFileCon := TvxFileCon.Create(Self), and this property returns that field directly. The object therefore normally exists even when no file-connection GUID is configured and before SetFileConnection has loaded a module into it.

Native SetFileConnection rejects an empty configured GUID, otherwise loads that module into the existing object and records success separately in FileConLoaded. That state property is not registered on this script surface. Consequently, non-nil does not prove that ModuleLoaded is true or that paths and behaviours came from the intended saved File Connection.

Reset keeps the object but resets its runtime state. The data definition owns its lifetime; retaining it after the owner is freed is unsafe.

  • TvxFileCon documents the returned class.
  • ModuleLoaded explains why its writable flag is not a load operation.
  • TvxFileDef is the visible data-definition descendant commonly using this property.
Created 2026-07-15