addMediaPath(virtualFolderName, mediaPath, networkSharePath, refreshLibrary) {

        if (!virtualFolderName) {
            throw new Error("null virtualFolderName");
        }

        if (!mediaPath) {
            throw new Error("null mediaPath");
        }

        let url = "Library/VirtualFolders/Paths";

        const pathInfo = {
            Path: mediaPath
        };
        if (networkSharePath) {
            pathInfo.NetworkPath = networkSharePath;
        }

        url = this.getUrl(url, {
            refreshLibrary: refreshLibrary ? true : false
        });

        return this.ajax({
            type: "POST",
            url,
            data: JSON.stringify({
                Name: virtualFolderName,
                PathInfo: pathInfo
            }),
            contentType: 'application/json'
        });
    }
/**
    * Adds an additional mediaPath to an existing virtual folder
    * @param {String} name
    */
Adds an additional mediaPath to an existing virtual folder
@param {String} name
Adds an additional mediaPath to an existing virtual folder @param { String } name
addMediaPath(virtualFolderName, mediaPath, networkSharePath, refreshLibrary) {
        if (!virtualFolderName) {
            throw new Error("null virtualFolderName");
        }
        if (!mediaPath) {
            throw new Error("null mediaPath");
        }
        let url = "Library/VirtualFolders/Paths";
        const pathInfo = {
            Path: mediaPath
        };
        if (networkSharePath) {
            pathInfo.NetworkPath = networkSharePath;
        }
        url = this.getUrl(url, {
            refreshLibrary: refreshLibrary ? true : false
        });
        return this.ajax({
            type: "POST",
            url,
            data: JSON.stringify({
                Name: virtualFolderName,
                PathInfo: pathInfo
            }),
            contentType: 'application/json'
        });
    }
addMediaPath ( virtualFolderName , mediaPath , networkSharePath , refreshLibrary ) { if ( ! virtualFolderName ) { throw new Error ( "null virtualFolderName" ) ; } if ( ! mediaPath ) { throw new Error ( "null mediaPath" ) ; } let url = "Library/VirtualFolders/Paths" ; const pathInfo = { Path : mediaPath } ; if ( networkSharePath ) { pathInfo . NetworkPath = networkSharePath ; } url = this . getUrl ( url , { refreshLibrary : refreshLibrary ? true : false } ) ; return this . ajax ( { type : "POST" , url , data : JSON . stringify ( { Name : virtualFolderName , PathInfo : pathInfo } ) , contentType : 'application/json' } ) ; }
Adds an additional mediaPath to an existing virtual folder
 @param {String} name
Adds an additional mediaPath to an existing virtual folder @param { String } name