code: function _validateLibraryFiles(repo, libraryName) {
  	const results = {
  		valid: true
  	};
  
  	const directory = repo.libraryDirectory(libraryName);
  
  	const requiredFiles = {
  		'README.md': /^README/i,
  		'LICENSE': /^LICENSE/i,
  	};
  
  	return _mainSourceName(repo, libraryName)
  		.then((mainSourceName) => {
  			// Match Windows and UNIX paths
  			// todo - factor out the regex (it's copied from PATTERNS.name.pattern without the start/end match)
  			//requiredFiles['main source'] = new RegExp('src[/\\\\][A-Za-z0-9][A-Za-z0-9-_\+]*.cpp', 'i');
  			requiredFiles['main header'] = new RegExp('src[/\\\\][A-Za-z0-9][A-Za-z0-9-_\+]*.h', 'i');
  		})
  		.then(() => _libraryFiles(directory))
  		.then((files) => {
  			for (const [requiredFile, filenamePattern] of Object.entries(requiredFiles)) {
  				if (!files.find((f) => f.match(filenamePattern))) {
  					results.valid = false;
  					results.errors = Object.assign({}, results.errors, {
  						[requiredFile]: 'is missing'
  					});
  				}
  			}
  
  			if (!results.valid) {
  				throw new ValidationFailed(results);
  			}
  		});
  }
docs: Validate that README, LICENSE and src/lib.cpp and src/lib.h are present
  @param {object} repo - filesystem library repo
  @param {string} libraryName - name of library in the filesystem repo
  @returns {Promise} - object with valid and errors keys
  @private