def delete_domain(domain)
- # Will raise an exception if the path doesn't exist.
domain_path = self.get_domain_path(domain)
+
+ if not File.directory?(domain_path)
+ raise NonexistentDomainError.new(domain.to_s())
+ end
+
FileUtils.rm_r(domain_path)
end
- def delete_account(account)
- # Will raise an exception if the path doesn't exist.
- account_path = self.get_account_path(account)
- FileUtils.rm_r(account_path)
+ def delete_user(user)
+ user_path = self.get_user_path(user)
+
+ if not File.directory?(user_path)
+ raise NonexistentUserError.new(user.to_s())
+ end
+
+ FileUtils.rm_r(user_path)
end
end