The TMReNameFile API call changes the name of a previously opened file specified by the 'file_handle'. The new name is given in the FileEntry structure 'fentry'. Only the 'name' and 'extension' portions of 'fentry' need be set before calling TMReNameFile. 'file_handle' must be set as a result of a call to TMOpenFile. Note that sub-directory names can not be changed to a file name and vise versa.
For a description of the above types, see the TMEX Type Descriptions.
Parameters
session_handle
Specifies the session handle returned from the API function TMExtendedStartSession that specifies the desired 1-Wire network port. This parameter is required by most TMEX API functions.
state_buffer
Specifies a pointer to a memory location that TMEX keeps all of the state information for the 1-Wire networks. This parameter is required by most TMEX API functions.
file_handle
Specifies a file handle of the file to rename.
fentry
Specifies a pointer to a memory location that contains a FileEntry structure. This structure must have the name and extension portions set before calling this API. This structure will contain the new name.
Return Value
1 => file name changed to new name
<0 => TMEX File Operations Error Return Code
See Also