build-tools/script/deploy-utils.js
async function readDirectory(sftp, path) {
  return new Promise(resolve => {
    sftp.readdir(path, (error, list) => {
      resolve(list || null);
    });
  });
}
async function readDirectory(sftp, path) {
  return new Promise(resolve => {
    sftp.readdir(path, (error, list) => {
      resolve(list || null);
    });
  });
}
async function readDirectory ( sftp , path ) { return new Promise ( resolve => { sftp . readdir ( path , ( error , list ) => { resolve ( list || null ) ; } ) ; } ) ; }
Read a directory
@param sftp
@param path
@returns {Promise<*>}
Read a directory