The pyedb.generic.filesystem library#

Summary#

Scratch

Class for managing a scratch directory.

search_files

Search for files inside a directory given a specific pattern.

my_location

Get the normalized path of the current file’s directory.

get_json_files

Get the absolute path to all JSON files in start_folder.

Module detail#

filesystem.search_files(dirname: str, pattern: str = '*') list[str]#

Search for files inside a directory given a specific pattern.

Parameters:
dirnamestr

Directory where the search will be performed.

patternstr, optional

Pattern to match files against. The default is "*", which matches all files.

Returns:
list
filesystem.my_location()#

Get the normalized path of the current file’s directory.

filesystem.get_json_files(start_folder)#

Get the absolute path to all JSON files in start_folder.

Parameters:
start_folderstr

Path to the folder where the JSON files are located.

Returns:
list

List of paths to JSON files in start_folder.