Lists the contents of a directory on a GridFTP server.



files = gd_listdir(host)

files = gd_listdir(host,remotedir)

files = gd_listdir(host,remotedir,listhidden)

files = gd_listdir(host,remotedir,listhidden,ispassive)

[files,details] = gd_listdir(...)



files = gd_listdir(host) where files is a cell array containing the filenames of files in the user's home directory on the GridFTP server host.


files = gd_listdir(host,remotedir) where files is a cell array containing the filenames of files in the directory remotedir on the GridFTP server host (if remotedir is empty the contents of the user's home directory will be listed).


files = gd_listdir(host,remotedir,listhidden) the list of filenames will include hidden files if the argument listhidden is true (equal to 1). Otherwise the names of hidden files will not be returned (default behaviour).


files = gd_listdir(host,remotedir,listhidden,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.


[files,details] = gd_listdir(host) as above where details is a cell array containing structures that describe the details of the files and directories contained in the remote directory.



A valid proxy certificate is required to use GridFTP.  


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


See also

gd_putfile, gd_getfile, gd_createproxy





Copyright © 2007, The Geodise Project, University of Southampton