Exemplo n.º 1
0
    def is_that_exists(self):
	if not os.path.exists(self.args):
	    if star_ops.is_star_cmd(self.args):
		star_ops.star_rm(self.args)
	    else:
		print 'WRONG path!'
	else:
	    self.rm_the_shit()
Exemplo n.º 2
0
    def copy_func(self): 
	if not os.path.exists(self.old):
	    if star_ops.is_star_cmd(self.old):
		cp_list = glob.glob(self.old)
		for item in cp_list:
		    self.is_destination_exists(item,self.new)
	    else:
		print 'Target NOT EXISTS!'
	else:
	    self.is_destination_exists(self.old,self.new)
	return
Exemplo n.º 3
0
    def move_dir(self): 
	if not os.path.exists(self.old):
	    if star_ops.is_star_cmd(self.old):
		mv_list = glob.glob(self.old)
		for item in mv_list:
		    self.real_move(item)
	    else:
		print 'Target NOT EXISTS!'
	else:
	    if os.path.exists(self.new):
		self.real_move(self.old)	
	    else:
		print 'The destination not exists, I will Create the shit!'
		mkd = mkdir.Mkdir(self.new)
		mkd.make_dir()
		self.real_move(self.old)	
	return