kunaljubce commented on code in PR #44126:
URL: https://github.com/apache/airflow/pull/44126#discussion_r1857898034


##########
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:
   @Dawnpool Yeah I am not too much in favour of deleting the existing 
directory, better left to the user to handle that. Seems fine to raise the 
error though and stop the process! 



-- 
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]

Reply via email to