You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
def directory(target, options={})
target = path(target)
case
when !File.exists?(target)
log_relative :missing, target
when !File.directory?(target)
log_relative 'not a directory', target
when target == Dir.pwd
when !Root.empty?(target)
paths = Dir.glob File.join(target, '**/*')
paths.unshift(target)
paths.sort.reverse_each do |path|
if Root.empty?(path)
log_relative :rm, path
FileUtils.rmdir(path) unless pretend
else
log_relative('not empty', path)
end
end
else
log_relative :rm, target
FileUtils.rmdir(target) unless pretend
end
target
end
The text was updated successfully, but these errors were encountered:
The text was updated successfully, but these errors were encountered: