index.js
function writeNewAsync(filepath, data){
	return new Promise((resolve, reject)=>{
		fs.writeFile(filepath, data ,{ flag: "wx" }, function(err){
			if (!err) resolve(true)
			else reject(err)
		})
	})
}
function writeNewAsync(filepath, data){
	return new Promise((resolve, reject)=>{
		fs.writeFile(filepath, data ,{ flag: "wx" }, function(err){
			if (!err) resolve(true)
			else reject(err)
		})
	})
}
function writeNewAsync ( filepath , data ) { return new Promise ( ( resolve , reject ) => { fs . writeFile ( filepath , data , { flag : "wx" } , function ( err ) { if ( ! err ) resolve ( true ) else reject ( err ) } ) } ) }
return a promise, fail with "EEXIST" when the file already exists
return a promise fail with EEXIST when the file already exists