Product Documentation

c-treeDB API for C# - Developers Guide

Previous Topic

Next Topic

CTSession.SetPathPrefix

SYNTAX

void SetPathPrefix( String path )

PARAMETERS

Path prefix or NULL if you wish to remove the current path prefix.

DESCRIPTION

The c-treeDB path prefix feature is similar to c-tree Server’s LOCAL_DIRECTORY configuration keyword. When SetPathPrefix() is called with a value, this value will be attached to the beginning of any file name that is not absolute.

Note: Path prefix does not became a permanent part of the file name. The path prefix is kept by the session handle and it is not persisted to disk. When the session handle is destroyed, the path prefix information is also destroyed.

A path prefix can be set anytime after the session handle is allocated. If a path prefix is set before a session logon, the new path prefix will affect the location of the session dictionary file. If a path prefix is set after a session logon, but before a database connect, then the path prefix affect only the database dictionary and any tables that are manipulated during that session. A path prefix can be removed at any time by passing a cleared or empty string as the path prefix or by calling ClearPathPrefix(). You can use GetPathPrefix() to check if a path prefix is set or not.

If GetPathPrefix() return NULL, then no path prefix is set.

RETURN

None.

SEE ALSO

ClearPathPrefix(), GetPathPrefix()

TOCIndex