general/misc/
file_retrieve.pro
Routines
top source file_retrieve
result = file_retrieve(pathnames, newpathnames, structure_format=structure_format, use_wget=use_wget, nowait=nowait, local_data_dir=local_data_dir, remote_data_dir=remote_data_dir, min_age_limit=min_age_limit, valid_only=valid_only, file_mode=file_mode, recurse_limit=recurse_limit, dir_mode=dir_mode, user_agent=user_agent, user_pass=user_pass, preserve_mtime=preserve_mtime, restore_mtime=restore_mtime, ascii_mode=ascii_mode, no_download=no_download, no_server=no_server, no_update=no_update, archive_ext=archive_ext, archive_dir=archive_dir, last_version=last_version, oldversion_dir=oldversion_dir, oldversion_ext=oldversion_ext, force_download=force_download, no_clobber=no_clobber, ignore_filesize=ignore_filesize, verbose=verbose, progress=progress, progobj=progobj)
FUNCTION: FILE_RETRIEVE Purpose: FILE_RETRIEVE will download files from a remote web server and copy them into a local (cache) directory maintaining the directory structure. It returns the list of local file names. By default files are only downloaded if the remote file is more recent or of different size. Usage: files = file_retrieve(pathnames,local_data_dir=local_data_dir,remote_data_dir=remote_data_dir) Suggested usage: source = file_retrieve(/struct) source.remote_data_dir = 'http://sprg.ssl.berkeley.edu/data/' ; Set other options on source as needed pathname = 'relativedir1/dir2/filename.ext' files = file_retrieve(pathname,_extra=source) Arguments: pathnames: String or string array with partial path to the remote file. (will be appended to remote_data_dir) [newpathnames]: (optional) String or string array with partial path to file destination. (Will be appended to local_data_dir) Keywords: local_data_dir: String or string array w/ local data directory(s) If newpathnames is set it will be appended to this variable; if not, pathnames will be appended. remote_data_dir: String or string array w/ remote data directory(s) Pathnames will be appended to this variable. PRESERVE_MTIME(optional): Uses the serve modification time instead of local modification time. This keyword is ignored on windows machines that don't have touch installed. (No cygwin or GNU utils) History: 2012-6-25: local_data_dir and remote_data_dir accept array inputs with the same # of elements as pathnames/newpathnames $LastChangedBy: davin-mac $ $LastChangedDate: 2014-12-06 11:05:16 -0800 (Sat, 06 Dec 2014) $ $LastChangedRevision: 16362 $ $URL: svn+ssh://thmsvn@ambrosia.ssl.berkeley.edu/repos/spdsoft/trunk/general/misc/file_retrieve.pro $
Parameters
- pathnames
- newpathnames
Keywords
- structure_format
- use_wget
- nowait
- local_data_dir
- remote_data_dir
- min_age_limit
- valid_only
- file_mode
- recurse_limit
- dir_mode
- user_agent
- user_pass
- preserve_mtime
- restore_mtime
- ascii_mode
- no_download
- no_server
- no_update
- archive_ext
- archive_dir
- last_version
- oldversion_dir
- oldversion_ext
- force_download
- no_clobber
- ignore_filesize
- verbose
- progress
- progobj
File attributes
Modification date: | Sat Dec 6 11:10:08 2014 |
Lines: | 127 |