Adds a new directory next to given Node associated path.

        :param node: Node.
        :type node: ProjectNode or DirectoryNode or FileNode
        :return: Method success.
        :rtype: bool

def add_new_directory(self, node):
        """
        Adds a new directory next to given Node associated path.

        :param node: Node.
        :type node: ProjectNode or DirectoryNode or FileNode
        :return: Method success.
        :rtype: bool
        """

        if self.__script_editor.model.is_authoring_node(node):
            return False

        directory, state = QInputDialog.getText(self, "Add Directory", "Enter your new directory name:")
        if not state:
            return False

        if node.family in ("Project", "Directory"):
            parent_directory = node.path
        elif node.family == "File":
            parent_directory = os.path.dirname(node.path)

        directory = foundations.strings.to_string(directory)
        if not directory in os.listdir(parent_directory):
            directory = os.path.join(parent_directory, directory)
            LOGGER.info("{0} | Adding '{1}' directory!".format(self.__class__.__name__, directory))
            os.makedirs(directory)
        else:
            self.__raise_file_system_exception(file, parent_directory)
        return True