Implemented function to list data files
Update function to list data files Follow Style Guidelines Add doc for listing files
This commit is contained in:
parent
a5b28ba799
commit
65f7b16f01
1 changed files with 15 additions and 0 deletions
|
|
@ -0,0 +1,15 @@
|
|||
from pathlib import Path
|
||||
|
||||
|
||||
def list_data_files(ext=''):
|
||||
"""
|
||||
Lists input data files.
|
||||
|
||||
:param ext:
|
||||
Extension of files to be displayed.
|
||||
:return:
|
||||
List of input data files.
|
||||
"""
|
||||
here = Path(__file__).parent
|
||||
data_files = [x.name for x in here.iterdir() if not x.name.startswith('__') and x.name.endswith(ext)]
|
||||
return data_files
|
||||
Loading…
Add table
Reference in a new issue