コード例 #1
0
ファイル: remove.py プロジェクト: bonnshore/bonn_file_cmd
    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()
コード例 #2
0
ファイル: copy.py プロジェクト: bonnshore/bonn_file_cmd
    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
コード例 #3
0
ファイル: move.py プロジェクト: bonnshore/bonn_file_cmd
    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