chooseFilePath_(selectType, fileType) {
      return new Promise(function(resolve, reject) {
        console.log("Tracing, calling chrome.developerPrivate.choosePath");
        chrome.developerPrivate.choosePath(
            selectType, fileType, function(path) {
              if (chrome.runtime.lastError &&
                  chrome.runtime.lastError != 'File selection was canceled.') {
                reject(chrome.runtime.lastError);
              } else {
                resolve(path || '');
              }
            });
      });
    }
/**
     * Opens a file browser dialog for the user to select a file (or directory).
     * @param {chrome.developerPrivate.SelectType} selectType
     * @param {chrome.developerPrivate.FileType} fileType
     * @return {Promise<string>} The promise to be resolved with the selected
     *     path.
     */
Opens a file browser dialog for the user to select a file (or directory).
@param {chrome.developerPrivate.SelectType} selectType
@param {chrome.developerPrivate.FileType} fileType
@return {Promise} The promise to be resolved with the selected
path.
Opens a file browser dialog for the user to select a file ( or directory ) . @param { chrome . developerPrivate . SelectType } selectType @param { chrome . developerPrivate . FileType } fileType @return { Promise } The promise to be resolved with the selected path .
chooseFilePath_(selectType, fileType) {
      return new Promise(function(resolve, reject) {
        console.log("Tracing, calling chrome.developerPrivate.choosePath");
        chrome.developerPrivate.choosePath(
            selectType, fileType, function(path) {
              if (chrome.runtime.lastError &&
                  chrome.runtime.lastError != 'File selection was canceled.') {
                reject(chrome.runtime.lastError);
              } else {
                resolve(path || '');
              }
            });
      });
    }
chooseFilePath_ ( selectType , fileType ) { return new Promise ( function ( resolve , reject ) { console . log ( "Tracing, calling chrome.developerPrivate.choosePath" ) ; chrome . developerPrivate . choosePath ( selectType , fileType , function ( path ) { if ( chrome . runtime . lastError && chrome . runtime . lastError != 'File selection was canceled.' ) { reject ( chrome . runtime . lastError ) ; } else { resolve ( path || '' ) ; } } ) ; } ) ; }
Opens a file browser dialog for the user to select a file (or directory).
Opens a file browser dialog for the user to select a file ( or directory ) .