The module SYSPTH contains functions and procedures for use within the following areas:
These functions and routines provide methods for handling file and directory names.
Procedure / Function | Argument(s) | Description |
---|---|---|
AddDateStampToFilename | ArgFil, ArgDat, ArgTim | Creates a file name extended by date and time. |
AddExtensionToName | ArgNam, ArgExt | Adds the extension to the directory path or file name. |
AddNodeToPath | ArgPth, ArgNode | Adds a directory name or a file name to a directory name. |
GetBaseNameWithoutTimeStamp | ArgNam | Returns a file name without the optional timestamp. (The inverse function of AddDateStampToFile). |
GetDirDel | Returns the directory delimiter. | |
GetFileExtension | ArgFil | Returns the extension of the passed file name. |
GetFilePrefix | ArgNam | Returns the preceding 'server:', 'client:' and 'db' of a file name. |
GetFileWithoutPrefix | ArgNam | Returns the file name without preceding 'server:', 'client:' and 'db:'. |
GetFullName | ArgPart, ArgNam | Returns the absolute file name for a specified partition. |
GetLastNode | ArgFil | Returns the last node of a specified file name. A node is a name used as a directory entry. |
GetNormalizedNodename | ArgFil | Translates the transferred text into a usable node name. Nodes cannot contain directory separators or any other special characters, for example. |
GetOSAccessableName | ArgFilename | Generates filenames for direct access (depending on the operating system). For this purpose, quotes are put around the filename. |
GetNulDev | Returns the file name of the 'null device' | |
GetPathOfName | ArgPth | Provides the path part of a transferred filename, or for a path, the path without the last name in the directory. |
IsAbsolutePath | ArgNam | This function checks, whether the passed file name is absolute. |
The functions beginning with a prefix tag provide functions for maintaining a stream, that contains pairs of tags and content. These pairs are saved in a stream, that is provided by the calling transaction. Thus, also 'multiple streams' are maintained.
Due to performance reasons it is recommended to keep the stream arranged in proper order in order to accelerate the access to the individual tags. In this case it has to be considered, that the insertion of new tags can lead to a reorganization of the sequence and indices of particular tags.
The processing of all tags of a stream can be done by loop processing of all lines of a stream. The tags can be called via “TagGetTag” and the content can be called via “TagGetContents”.
The internal structure for storing tags is:
Tag - followed by a '=' character, trailed by the content
The content can be texts or text blocks with CR characters (carriage return). The only constraint is that the tags may not contain '=' characters.
Procedure / Function | Argument(s) | Description |
---|---|---|
TagGetContents | Argstream, ArgTag | Calling the content of a tag. |
TagGetIdx | Argstream, ArgTag | Calling the line of the stream that contains the passed tag. |
TagGetTag | Argstream, ArgIdx | Calling the tag of a passed line. |
TagSetContents | Argstream, ArgTag, ArgContents | Storing and updating a tag with associated content in the passed stream. |
Procedure / Function | Argument(s) | Description |
---|---|---|
ExecuteScript | ArgCmd, ArgArgs, ArgLog | Executes a script. |
GetSwitchFromLine | ArgSwt, ArgLin | Searches for the passed switch in the command line. |
IsUnix | Checks, whether the current system is a Unix system. | |
LnkGetSwitch | ArgSwt | Searches for the passed switch in the command line. |
MakeLocalCopy | ArgPart, ArgFil, ArgLocalPath, ArgExt | Copies a file server to client. |
ShowLocalCopy | ArgPart, ArgFil, ArgExt | Displays a file of a server on the client. |
ValBase36 | ArgStr | Converts a Base36 number into a decimal number. |