Add mvfile() to sysutils
This adds mvfile(), which works basically like cpfile().
This commit is contained in:
parent
c4337815db
commit
7be79ceba2
@ -92,6 +92,12 @@ def cpfile(src, dst):
|
||||
|
||||
return dst
|
||||
|
||||
def mvfile(src, dst):
|
||||
if os.path.isdir(dst):
|
||||
dst = joinpaths(dst, os.path.basename(src))
|
||||
os.rename(src, dst)
|
||||
return dst
|
||||
|
||||
def remove(target):
|
||||
if os.path.isdir(target):
|
||||
shutil.rmtree(target)
|
||||
|
Loading…
Reference in New Issue
Block a user