function createNewFolder(folder) {
    // Also get the current url
    const url = $('#node-input-url').val()

    $.ajax({
        type: 'POST',
        dataType: 'json',
        url: `./uibuilder/admin/${url}`,
        data: {
            folder: folder,
            cmd: 'newfolder',
        },
        beforeSend: function(jqXHR) {
            const authTokens = RED.settings.get('auth-tokens')
            if (authTokens) {
                jqXHR.setRequestHeader('Authorization', 'Bearer ' + authTokens.access_token)
            }
        },
    })
        .done(function() { // data, textStatus, jqXHR) {
            RED.notify(`uibuilder: Folder <code>${folder}</code> Created.`, { type: 'success', })
            // Rebuild the file list
            getFileList()
            // Rebuild the folder list
            getFolders()

            return 'Create folder succeeded'
        })
        .fail(function(jqXHR, textStatus, errorThrown) {
            RED.notify(`uibuilder: Create Folder Error.<br>${errorThrown}`, { type: 'error', })
            return 'Create folder failed'
        })
}
Call v3 admin API to create a new folder
@param {string} folder Name of new folder to create (combines with current uibuilder url)
returns {string} Status message