##// END OF EJS Templates
util: move "default" unlinkpath to posix.py...
Adrian Buehlmann -
r14909:c627fe32 default
parent child Browse files
Show More
@@ -328,3 +328,13 b' def termwidth():'
328
328
329 def makedir(path, notindexed):
329 def makedir(path, notindexed):
330 os.mkdir(path)
330 os.mkdir(path)
331
332 def unlinkpath(f):
333 """unlink and remove the directory if it is empty"""
334 os.unlink(f)
335 # try removing directories that might now be empty
336 try:
337 os.removedirs(os.path.dirname(f))
338 except OSError:
339 pass
340
@@ -390,15 +390,6 b' def checksignature(func):'
390
390
391 return check
391 return check
392
392
393 def unlinkpath(f):
394 """unlink and remove the directory if it is empty"""
395 os.unlink(f)
396 # try removing directories that might now be empty
397 try:
398 os.removedirs(os.path.dirname(f))
399 except OSError:
400 pass
401
402 def copyfile(src, dest):
393 def copyfile(src, dest):
403 "copy a file, preserving mode and atime/mtime"
394 "copy a file, preserving mode and atime/mtime"
404 if os.path.islink(src):
395 if os.path.islink(src):
General Comments 0
You need to be logged in to leave comments. Login now