nuka.tasks.file
¶
file related tasks
nuka.tasks.file.chmod¶
nuka.tasks.file.chown¶
nuka.tasks.file.exists¶
Example:
res = await file.exists('/tmp')
assert bool(res) is True
res = await file.exists('/nope')
assert bool(res) is False
nuka.tasks.file.mkdirs¶
nuka.tasks.file.mv¶
nuka.tasks.file.put¶
Example:
await file.put([
dict(src='/etc/resolv.conf', dst='/tmp/resolv.conf'),
dict(src='docs/utils.py', dst='/tmp/utils.py', executable=True),
# jinja2 template
dict(src='example.j2', dst='/tmp/xx1', mod='600'),
# symlink
dict(linkto='/etc/hosts', dst='/etc/hosts2'),
], ctx=dict(name='example'))