1
0
mirror of https://github.com/altlinux/gpupdate.git synced 2025-03-21 18:50:38 +03:00

Add touch_file function

This commit is contained in:
Valery Sinelnikov 2023-07-07 10:15:31 +04:00
parent b053544512
commit 7e225c837a

View File

@ -174,3 +174,8 @@ def string_to_literal_eval(string):
except:
literaleval = string
return literaleval
def touch_file(filename):
path = Path(filename)
path.parent.mkdir(parents=True, exist_ok=True)
path.touch()