Common Desktop Environment: ToolTalk Messaging Overview

tt_netfile_file

char *
tt_netfile_file(
     const char *  netfilename );

The tt_netfile_file function maps between canonical and local path names. It converts the file specified netfilename to a path name that is valid on the local host. The netfilename is a copy of a null-terminated string returned by tt_netfile_file.


Note -

You do not need to call the tt_open function before you use this function.


If the specified file is not currently mounted on the local host, a path name in the form of

/DTMOUNTPOINT/host/filepath

is constructed, where:

DTMOUNTPOINT

is the intended mount point for the automounter's host map. You can also specify this mount point with the environment variable DTMOUNTPOINT.

host

is the host that contains the file.

filepath

is the path to the file contained on the host.

This function returns either an error pointer or, if successful, a newly-allocated null-terminated local file name.

Use tt_ptr_error to extract a status from an error pointer. Possible errors are described in Table C-4.

Table C-4 Possible Errors Returned by tt_netfile_file

Error 

Description 

TT_ERR_PATH

netfilename is not a valid netfilename

TT_ERR_DBAVAIL

rpc.ttdbserverd could not be reached on host

TT_ERR_DBEXIST

rpc.ttdbserverd does not appear to be properly installed on host

To free allocated strings, use either the tt_free or tt_release call.

To convert the file back to a net file name for the same file, use the tt_file_netfile() function.