def _move(self, path):
if path == self.path:
return
files = self.get_marked() or self.get_selected()
if not isabs(path):
path = join(self.path, path)
if not isdir(path):
sublime.error_message('Not a valid directory: {}'.format(path))
return
# Move all items into the target directory. If the target directory was also selected,
# ignore it.
files = self.get_marked() or self.get_selected()
path = normpath(path)
for filename in files:
fqn = normpath(join(self.path, filename))
if fqn != path:
shutil.move(fqn, path)
self.view.run_command('dired_refresh')
评论列表
文章目录