def create(path, recursive=False, mode=None, owner=None, group=None): recursive = recursive and '-p' or '' if exists(path): return run('mkdir %s %s' % (recursive, path)) attributes(path, mode=mode, owner=owner, group=group)
def create(path, recursive=False, mode=None, owner=None, group=None): recursive = recursive and '-p' or '' if exists(path): return core.run('mkdir %s %s' % (recursive, path)) attributes(path, mode=mode, owner=owner, group=group)
def copy(source, destination, force=True, mode=None, owner=None, group=None): force = force and '-f' or '' core.run('cp %s %s %s' % (force, source, destination)) attributes(destination, mode=mode, owner=owner, group=group)
def touch(location, mode=None, owner=None, group=None): core.run('touch %s' % location) attributes(location, mode=mode, owner=owner, group=group)
def temp(mode=None, owner=None, group=None): path = core.run('mktemp').stdout attributes(path, mode=mode, owner=owner, group=group) return path
def temp(mode=None, owner=None, group=None): path = run('mktemp --directory') attributes(path, mode=mode, owner=owner, group=group) return path
def link(source, destination, symbolic=True, force=True, mode=None, owner=None, group=None): force = force and '-f' or '' symbolic = symbolic and '-s' or '' run('ln %s %s "%s" "%s"' % (symbolic, force, source, destination)) attributes(destination, mode, owner, group)