Module helpers

Source
Expand description

Provides general purpose file and path helpers.

Functionsยง

get_project_name_from_path
Gets the last component (name of a project) of a path or returns a default value if the path has no valid last component.
get_relative_or_absolute_path
Returns the relative path from base to full if full is inside base. If full is outside base, returns the absolute path instead.
prefix_with_current_dir_if_needed
Transforms a path without prefix into a relative path starting at the current directory.
replace_in_file
Replaces occurrences of specified strings in a file with new values.