mirror of
https://github.com/spalencsar/bearhub.git
synced 2026-07-07 00:04:15 +02:00
9 lines
331 B
Python
9 lines
331 B
Python
from typing import Optional, Tuple
|
|
|
|
from bauh.commons.system import execute
|
|
|
|
|
|
def mkdir(dir_path: str, parent: bool = True, custom_user: Optional[str] = None) -> Tuple[bool, Optional[str]]:
|
|
code, output = execute(f'mkdir {"-p " if parent else ""}"{dir_path}"', shell=True, custom_user=custom_user)
|
|
return code == 0, output
|