File tree Expand file tree Collapse file tree 2 files changed +12
-9
lines changed
Expand file tree Collapse file tree 2 files changed +12
-9
lines changed Original file line number Diff line number Diff line change @@ -74,8 +74,8 @@ def directory_has_contents(pointer: FilePointer) -> bool:
7474
7575
7676def get_directory_contents (pointer : FilePointer ) -> List [FilePointer ]:
77- """Finds all files and directories in the specified directory.
78-
77+ """Finds all files and directories in the specified directory.
78+
7979 NBL This is not recursive, and will return only the first level of directory contents.
8080
8181 Args:
@@ -85,7 +85,7 @@ def get_directory_contents(pointer: FilePointer) -> List[FilePointer]:
8585 New file pointers to files or subdirectories below this directory.
8686 """
8787 contents = os .listdir (pointer )
88- if len (contents ) == 0 :
88+ if len (contents ) == 0 :
8989 return []
9090 contents .sort ()
9191 return [append_paths_to_pointer (pointer , x ) for x in contents ]
Original file line number Diff line number Diff line change 11import os
22
3- from hipscat .io .file_io import (append_paths_to_pointer ,
4- directory_has_contents ,
5- does_file_or_directory_exist ,
6- find_files_matching_path ,
7- get_directory_contents ,
8- get_file_pointer_from_path , is_regular_file )
3+ from hipscat .io .file_io import (
4+ append_paths_to_pointer ,
5+ directory_has_contents ,
6+ does_file_or_directory_exist ,
7+ find_files_matching_path ,
8+ get_directory_contents ,
9+ get_file_pointer_from_path ,
10+ is_regular_file ,
11+ )
912
1013
1114def test_get_pointer_from_path (tmp_path ):
You can’t perform that action at this time.
0 commit comments