bmmltools.utils.basic.manage_path

bmmltools.utils.basic.manage_path(path)

Check if all the folders specified in a given path exist and if not it creates them. This is done in OS independent way.

P.A.: the string in the path field must be RAW! You can easily do that just adding “r” in front of the string of the path, e.g.

[naive string of the path] -> [raw string of the path]

‘home/folder1/folder2/file.extension’ -> r’home/folder1/folder2/file.extension’

If this is not done, escape characters may alter the path of the function.

Parameters:

path – RAW string containing the path possibly with file (put an “r” in front of the string!)

Returns:

the normalized path