# File lib/rubigen/commands.rb, line 541 def directory(relative_path) parts = relative_path.split('/') until parts.empty? partial = File.join(parts) path = destination_path(partial) if File.exist?(path) if Dir[File.join(path, '*')].empty? logger.rmdir partial unless options[:pretend] if options[:svn] # If the directory has been marked to be added # but has not yet been checked in, revert and delete if options[:svn][relative_path] system("svn revert #{path}") FileUtils.rmdir(path) else # If the directory is not in the status list, it # has no modifications so we can simply remove it system("svn rm #{path}") end # I don't think git needs to remove directories?.. # or maybe they have special consideration... else FileUtils.rmdir(path) end end else logger.notempty partial end else logger.missing partial end parts.pop end end