File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -73,14 +73,16 @@ def fetch_metadata(self, record: str) -> Record:
7373 return records [0 ]
7474
7575 def fetch_file (self , file_url : str , output_dir : str = "" , modified : str = "" ) -> str :
76- """Download a file from TIND and save it locally. If the file already exists in the output
77- directory and has a local modified timestamp that is newer than supplied ``modified``
76+ """Download a file from TIND and save it locally.
77+
78+ If the file already exists in the output directory and was modified at or after a supplied ``modified``
7879 timestamp, the file will not be re-downloaded.
7980
8081 :param str file_url: The TIND file download URL.
8182 :param str output_dir: Directory in which to save the file.
8283 Falls back to ``default_storage_dir`` when empty.
83- :param str modified: Optional modified timestamp from the file metadata returned by TIND
84+ :param str modified: Optional modified timestamp from the file metadata returned by TIND.
85+ If not specified, the file will always be downloaded.
8486 :raises AuthorizationError: When the TIND API key is invalid or the file is restricted.
8587 :raises ValueError: When ``file_url`` is not a valid TIND file download URL.
8688 :raises RecordNotFoundError: When the file is invalid or not found.
You can’t perform that action at this time.
0 commit comments