IMetabaseDefinitions.ReadFromFile

Syntax

ReadFromFile(FileName: String);

Parameters

FileName. Path to the file with repository descriptions.

Description

The ReadFromFile method reads the description of repositories from the file.

Comments

The structure of the file is described in the Setting Up Repositories and Autoupdate Using File section.

Example

Executing the example requires the C:\Def.xml file that contains repository descriptions. The descriptions that are contained in the file, are not present in the manager of repositories.

Sub UserProc;
Var
    Man: IMetabaseManager;
    Defs: IMetabaseDefinitions;
    Def: IMetabaseDefinition;
Begin
    Man := MetabaseManagerFactory.Active;
    Defs := Man.Definitions;
    Defs.ReadFromFile("c:\Def.xml");
    For Each Def In Defs Do
        Def.Save;
    End For;
End Sub UserProc;

After executing the example, repository descriptions are loaded from the specified file. These descriptions will be saved and in further can be used on working with the platform.

See also:

IMetabaseDefinitions