Tests the existence of files and directories on a Globus resource.
exists = gd_fileexists(host,remotefile)
exists = gd_fileexists(host,remotefile,ispassive)
exists = gd_fileexists(host,remotefile) returns an integer exists indicating whether the file or directory specified by remotefile exists on the Globus server specified by the string host. The argument exists will equal 1 is the file exists on host, otherwise it will equal 0.
exists = gd_fileexists(host,remotefile,ispassive) where if ispassive is false the active FTP mode will be used, otherwise the default passive FTP mode will be used. If a passive connection cannot be established a warning is displayed and an active mode connection will be attempted.
result = gd_fileexists('server.domain.com','/home/<USER>/test.dat');
A valid proxy certificate is required to use this function.
In earlier versions of this function the default FTP mode was active. The passive mode is now used by default since this is may be more appropriate when the GridFTP client is behind a firewall which blocks incoming connections
Copyright © 2007, The Geodise Project, University of Southampton