Skip to content

Commit

Permalink
add recursive option for directory interator iterdir() (#111)
Browse files Browse the repository at this point in the history
  • Loading branch information
khsrali authored Jul 11, 2024
1 parent 0cfdc3e commit c40443c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions firecrest/path.py
Original file line number Diff line number Diff line change
Expand Up @@ -455,11 +455,11 @@ def is_socket(self) -> bool:
return False
return stat.S_ISSOCK(st_mode)

def iterdir(self, hidden=True) -> Iterator[Self]:
def iterdir(self, hidden=True, recursive=False) -> Iterator[Self]:
"""Iterate over the directory entries."""
with self.convert_header_exceptions():
results = self._client.list_files(
self._machine, self.path, show_hidden=hidden
self._machine, self.path, show_hidden=hidden, recursive=recursive
)
for entry in results:
yield self._new_path(
Expand Down

0 comments on commit c40443c

Please sign in to comment.