FHoffmannCode commented on a change in pull request #10991:
URL: https://github.com/apache/airflow/pull/10991#discussion_r495755344
##########
File path: airflow/providers/microsoft/azure/hooks/azure_fileshare.py
##########
@@ -96,6 +96,26 @@ def list_directories_and_files(self, share_name,
directory_name=None, **kwargs):
"""
return self.get_conn().list_directories_and_files(share_name,
directory_name, **kwargs)
+ def list_files(self, share_name, directory_name=None, **kwargs):
+ """
+ Return the list of files stored on a Azure File Share.
+
+ :param share_name: Name of the share.
+ :type share_name: str
+ :param directory_name: Name of the directory.
+ :type directory_name: str
+ :param kwargs: Optional keyword arguments that
+ `FileService.list_directories_and_files()` takes.
+ :type kwargs: object
+ :return: A list of files
+ :rtype: list
+ """
+ return [
+ obj.name
+ for obj in self.list_directories_and_files(share_name,
directory_name, **kwargs)
+ if isinstance(obj, File)
Review comment:
a `Directory` object
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
[email protected]