dgs.utils.files.is_project_dir¶
- dgs.utils.files.is_project_dir(filepath: str, root: str = '/home/runner/work/dynamically-gated-similarities/dynamically-gated-similarities') bool [source]¶
Returns whether this filepath is a path of an existing directory in this project.
- Parameters:
filepath (FilePath) – The path to check.
root (FilePath) – The absolute path to the root of the project. It can be modified to point to other locations. Default: PROJECT_ROOT.
- Returns:
True if the
filepath
is a directory insideroot
, False otherwise.- Return type:
bool