Remote File IO (32 bit)


Introduction

       CAVERNsoft provides classes to download files from remote servers or upload files to them.


CAVERNsoft classes used

    CAVERNnet_remoteFileIOServer32_c

                This class is used to set up a server for remote file I/O. The init() method is called first and then we cam use process() to locate any clients wanting to perform remote I/O.

    CAVERNnet_remoteFileIOClient32_c

                A client instantiated using this class can upload() or download() files to the remote server established above. You can access the timestamp on the local file using getLocalDateTime() or on the remote file using getRemoteDateTime() , and then find out which of the two files is the latest by comparing the timestamps with compareDateTime() . Use getRemoteFileList() to obtain a list of files on the remote machine in a certain path.

                In the demo programs, servertcp.cxx sets up the TCP server and  client.cxx tries to download a file from a remote machine. The client compares the timestamp on the downloaded file and the remote file, and determines if there was any change since the download. The client.cxx also shows how the class CAVERNmisc_fileInfo_c and the CAVERNmisc_fileList_c classes can be used to obtain a list of files in a given path(note : this will work only on the SGI,LINUX or SUN platforms).


Usage

 1. To run the server
          server

 2. To run a client
            Download remote file:
                    client <hostname> -d localfilename remotefilename

            Remote File List:
                    client <hostname> -f remotePathname -r(optional)

Output

            The client will print the the remote file's date and time stamp. The download time and network statistics will also be displayed. The client will then print out the local file's date and time stamp and also whether its newer/older with respect to the remote file. The log is appended to the file remoteFileIO32.log . If  the -f flag was used a list of files will be obtained for the specified path.

for more information email : cavern@evl.uic.edu