TMDirectoryMR Overview Group

The TMDirectoryMR API call Makes or Removes a sub-directory from the current directory. There is an 'operation' flag that indicates if the call is to make or remove a sub-directory. Here are the values of 'operation':

0 :  make sub-directory specified by FileEntry 'dir_buf'

1 :  remove sub-directory specified by FileEntry 'dir_buf'

Only the 'name' field of the FileEntry structure need be filled in before calling TMDirectoryMR. Note that a sub-directory is created empty and only an empty sub-directory can be removed.


short far pascal TMDirectoryMR(

long session_handle,      // session handle for the desired 1-Wire network
void far *state_buffer,   // state buffer provided for the 1-Wire network session
short operation,          // removing(1) or making(0) a sub-directory
FileEntry far *fentry     // pointer to a structure with the file information
);

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.

operation

Specifies whether making or removing the current directory. (1) indicates removing and (0) indicates making.

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.

Return Value

1 => operation is successful

<0 => TMEX File Operations Error Return Code

Code Example

See Also

TMChangeDirectory, TMFirstFile