3d-dart/server/system/Utils.py
def MakeBackup(infile,report=False):
	
	"""Make backup of files or directories by checking if file (or backup as _*) is there and rename"""
	
	if os.path.isfile(infile) or os.path.isdir(infile):
		i = 1
		while i < 100:
			if os.path.isfile(infile+'_'+str(i)) or os.path.isdir(infile+'_'+str(i)):
				i = i+1
			else:
				os.rename(infile, infile+'_'+str(i))
				break

	if report == True:
		return infile
Make backup of files or directories by checking if file (or backup as _*) is there and rename
Make backup of files or directories by checking if file (or backup as _*) is there and rename
Make backup of files or directories by checking if file ( or backup as _ * ) is there and rename
def MakeBackup(infile,report=False):
	if os.path.isfile(infile) or os.path.isdir(infile):
		i = 1
		while i < 100:
			if os.path.isfile(infile+'_'+str(i)) or os.path.isdir(infile+'_'+str(i)):
				i = i+1
			else:
				os.rename(infile, infile+'_'+str(i))
				break
	if report == True:
		return infile
def MakeBackup ( infile , report = False ) : if os . path . isfile ( infile ) or os . path . isdir ( infile ) : i = 1 while i < 100 : if os . path . isfile ( infile + '_' + str ( i ) ) or os . path . isdir ( infile + '_' + str ( i ) ) : i = i + 1 else : os . rename ( infile , infile + '_' + str ( i ) ) break if report == True : return infile
Make backup of files or directories by checking if file (or backup as _*) is there and rename
Make backup of files or directories by checking if file ( or backup as _ * ) is there and rename
"""Make backup of files or directories by checking if file (or backup as _*) is there and rename"""
infile
report