ToolTalk User's Guide

Managing Object and File Information


Caution – Caution –

Despite the efforts of the ToolTalk service and integrated applications, object references can still be broken if you remove, move, or rename files with standard operating system commands such as rm or mv. Broken references will result in undeliverable messages.


Managing Files that Contain Object Data

To keep the ToolTalk database that services the disk partition where a file that contains object data is stored up-to-date, use the ToolTalk functions to copy, move, or destroy the file. Table 12–3 lists the ToolTalk functions you use to manage files that contain object data.

Table 12–3 Functions to Copy, Move, or Remove Files that Contain Object Data

ToolTalk Function 

Description 

tt_file_move(const char *oldfilepath, const char *newfilepath)

Moves the file and the ToolTalk object data 

tt_file_copy(const char *oldfilepath, const char *newfilepath)

Copies the file and the ToolTalk object data 

tt_file_destroy(const char *filepath)

Removes the file and the ToolTalk object data 

The return type for these functions is Tt_status.

Managing Files that Contain ToolTalk Information

The ToolTalk service provides ToolTalk-enhanced shell commands to copy, move, and remove ToolTalk object and file information. Table 12–4 lists the ToolTalk-enhanced shell commands that you and users of your application should use to copy, move, and remove files referenced in messages and files that contain objects.

Table 12–4 ToolTalk-Wrapped Shell Commands

Command 

Description 

ttcp

Copies file to new location. Updates file and object location information in ToolTalk database. 

ttmv

Renames directory or files. Updates file and object location information in ToolTalk database.  

ttrm

Removes specified file. Removes file and object information from the ToolTalk database. 

ttrmdir

Removes empty directories (directories that contain no files) that have ToolTalk object specs associated with them. (It is possible to create an object spec for a directory; when an object spec is created, the path name of a file or directory is supplied.) 

Removes object information from the ToolTalk database. 

tttar

Archives (or extracts) multiple files and object information into (or from) a single archive, called a tarfile. Can also be used to only archive (or extract) ToolTalk file and object information into (or from) a tarfile.