Elron commited on
Commit
c6173ed
1 Parent(s): 35bdc40

Upload file_utils.py with huggingface_hub

Browse files
Files changed (1) hide show
  1. file_utils.py +6 -3
file_utils.py CHANGED
@@ -1,9 +1,12 @@
1
  import os
 
2
 
3
 
4
- def get_all_files_in_dir(dir_path: str, recursive: bool = False, file_extension: str = None):
5
- """
6
- Get all files in a directory. Optionally recursively.
 
 
7
  Optionally filter by file extension.
8
 
9
  :param dir_path: The directory path to search for files.
 
1
  import os
2
+ from typing import Optional
3
 
4
 
5
+ def get_all_files_in_dir(
6
+ dir_path: str, recursive: bool = False, file_extension: Optional[str] = None
7
+ ):
8
+ """Get all files in a directory. Optionally recursively.
9
+
10
  Optionally filter by file extension.
11
 
12
  :param dir_path: The directory path to search for files.