Created
August 13, 2011 15:30
-
-
Save akuzemchak/1143956 to your computer and use it in GitHub Desktop.
Delete non-empty folder in Sublime Text 2
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# add the following class... | |
class DeleteFolderRecursiveCommand(sublime_plugin.WindowCommand): | |
from shutil import rmtree | |
def run(self, dirs): | |
try: | |
rmtree(dirs[0]) | |
except: | |
sublime.status_message("Folder could not be deleted") | |
def is_visible(self, dirs): | |
return len(dirs) == 1 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment