Partition Import

Command line:
tlapi ‑cIMPPART ‑isArchive] [‑OsLogFile] sPart
Library call:
nStatus = TLimportPart (sPart, sArchive, sLogFile, 0L)
Scripting call:
nStatus = ImportPartition (sPart, sArchive, sLogFile)

Function

Restore a partition from an archive file. The archive file must be in the format produced by the partition export function.

The partition must not exist. If necessary, use the remove partition function to remove it first.

The publication folder for the new partition must exist. For example, if the repository is in C:\TopLeaf and the partition path is manuals/test, then the C:\TopLeaf\manuals folder must exist.

Arguments

sPart

The path of the partition to create from the archive.

For the scripting call only, if this is undefined or the empty string, the Partition property is used to determine the path.

sArchive

The path to the archive file.

sLogFile

If this is defined a log file will be created if errors occur when restoring the archive. Any existing file with this path will be removed. To ensure correct operation this should contain an absolute path if present.

The library and scripting calls ignore this if it is NULL or the empty string.

For additional command line arguments see “Common Flag Arguments”.

Examples

Command line:

tlapi ‑cIMPPART ‑i/tmp/guide.zip manuals/guide

Library call:

status = TLimportPart("manuals/guide", "/tmp/guide.zip", NULL, 0L);

Scripting call:

status = topleaf.ImportPartition("manuals/guide", "/tlsave/guide.zip", "");