Dawnpool commented on code in PR #44126:
URL: https://github.com/apache/airflow/pull/44126#discussion_r1860896988
##########
providers/src/airflow/providers/sftp/hooks/sftp.py:
##########
@@ -275,6 +276,47 @@ def delete_file(self, path: str) -> None:
conn = self.get_conn()
conn.remove(path)
+ def retrieve_directory(self, remote_full_path: str, local_full_path: str,
prefetch: bool = True) -> None:
+ """
+ Transfer the remote directory to a local location.
+
+ If local_full_path is a string path, the directory will be put
+ at that location.
+
+ :param remote_full_path: full path to the remote directory
+ :param local_full_path: full path to the local directory
+ :param prefetch: controls whether prefetch is performed (default: True)
+ """
+ os.mkdir(local_full_path)
Review Comment:
@kunaljubce I've also updated this check from `isdir()` to `exists()` to
make sure both a file and a directory with the same name do not exist.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]