blob: 0b051b1a664fa054568cebf527ffcde0c60889eb (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
|
# TODO: docstrings
def is_file(path):
return path.is_file() and not path.is_symlink()
def is_link(path):
return path.is_file() and path.is_symlink()
def mkdir(path):
try:
path.mkdir(parents=True)
except FileExistsError:
pass
def touch(path):
mkdir(path.parent)
path.touch()
|