The program sample5 is called in this way:sample5
dvz1
The name and transfer admission to the remote system are then requested in the dialog box.
The program determines the attributes of all the files in the directory dvz1 in a remote system and outputs them on screen. The directory must be specified either as an absolute path, or relative to the user's HOME directory (see "File transfer") or relative to the user ID in the remote system as defined in the admission profile. In the example, information is output on all the located files.
The program is structured as follows:
The function ft_sdopen() reads information about the content of the specified directory in the remote system and this is buffered internally.
The buffer is then read in a loop (20 entries at a time) using ft_sdinfo() and is displayed.
Finally, t_sdclose() is called to terminate the identification of the file attributes and release resources that are no longer required.