src.utils.path module

helperfile for providing path managing methods. - conversion to rel path - listing of a filetree

src.utils.path.getRelPath(absPath)[source]

returns the relative path for some absolute path

Parameters:

absPath (str) – the absolute path, which is to be convert

Returns:

relPath – the resulting relative path

Return type:

str

src.utils.path.list_relative_filepaths(path)[source]

Collects all files in a directory tree and returns their paths relative to the given base path.

Parameters:

path (str) – The base directory to scan (relative path only).

Returns:

filepaths – List of file paths relative to the provided base directory.

Return type:

list[str]

src.utils.path.transformPathtoFileList(PathToFolder)[source]

accepts a path which contains a folder or file and accepts both rel and abs path. it returns a list of provided files as a rel path.

Parameters:

PathToFolder (str) – provided path

Returns:

files – a list of rel paths to the files

Return type:

list[str]

Dependency Diagrams (without externals):

digraph imports {
  rankdir=LR;
  node [shape=box];
  "src.core.analyse.plugin" -> "src.utils.path";
  "src.core.config" -> "src.utils.path";
  "src.core.macros" -> "src.utils.path";
  "src.visuals.windows.main_window" -> "src.core.config";
  "src.visuals.windows.main_window" -> "src.core.macros";
  "src.visuals.windows.main_window" -> "src.utils.path";
}

Import dependencies (collapsed)

Dependency Diagrams:

digraph imports {
  rankdir=LR;
  node [shape=box];
  "src.core.analyse.plugin" -> "src.utils.path";
  "src.core.config" -> "src.utils.path";
  "src.core.macros" -> "src.utils.path";
  "src.visuals.windows.main_window" -> "src.core.config";
  "src.visuals.windows.main_window" -> "src.core.macros";
  "src.visuals.windows.main_window" -> "src.utils.path";
}

Import dependencies (collapsed)