buildtools/country_data/get_directory_args.js
function assertIsDirectory(path) {
  try {
    if (!fs.lstatSync(path).isDirectory()) {
      console.log('Path "' + path + '" is not a directory.');
      process.exit();
    }
  } catch (e) {
    console.log('Directory "' + path + '" could not be found.');
    process.exit();
  }
}
function assertIsDirectory(path) {
  try {
    if (!fs.lstatSync(path).isDirectory()) {
      console.log('Path "' + path + '" is not a directory.');
      process.exit();
    }
  } catch (e) {
    console.log('Directory "' + path + '" could not be found.');
    process.exit();
  }
}
function assertIsDirectory ( path ) { try { if ( ! fs . lstatSync ( path ) . isDirectory ( ) ) { console . log ( 'Path "' + path + '" is not a directory.' ) ; process . exit ( ) ; } } catch ( e ) { console . log ( 'Directory "' + path + '" could not be found.' ) ; process . exit ( ) ; } }
Asserts that the given path points to a directory and exits otherwise.
@param {string} path
Asserts that the given path points to a directory and exits otherwise .