blob: 87f82af628f6823f9daf965ee725947f21019e7b (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
|
# TODO: docstrings
# XXX: can this move into tests/?
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()
|