add_from_dir¶
- edge_pydb.util.add_from_dir(src, dest='', copy=True, overwrite=False, max_depth=-1)[source]¶
This function copy files from a src directory to dest directory, if dest is empty, then it creates a directory just under the edge_pydb package directory. The copy always assumes a topdown copy (i.e. from parent directory to child directories)
- Parameters:
- srcstr
source directory to copy from
- deststr
destination directory to copy to
- copyboolean
if copy is false, files will not be copied, and instead the path of these files will be recorded in the _config.json
- overwriteboolean
if file is at the destination, overwrite the file if true, else create and copy into a subdirectory data/ under the edge_pydb package directory
- max_depthint
- specify the depth the copy should perform.
-1 means copy all directories 0 means just under the root directory and do not go into subdirectories