Spaces:
Running
Running
File size: 309 Bytes
26f7fa0 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 |
"""
MLSTRUCT-FP - UTILS - PATH
Path utils.
"""
__all__ = ['make_dirs']
import os
def make_dirs(f: str) -> str:
"""
Create dir if not exists.
:param f: Filename
:returns: File
"""
if f != '':
fdir = os.path.dirname(f)
os.makedirs(fdir, exist_ok=True)
return f
|