How to extract the return value of callback method

  node.js, question

function d() {

fs.exists(path,function(exists){
 var o= (exists ?  "Exists": "Does not exist!"  );
 return o;
 });
 
 bracket
 return d();
 
 //i want to assign o to function d;  Because another file requires the value of o.
 //what if return o above is wrong?
function d(callback) {
 
 fs.exists(path,function(exists){
 var o= (exists ?  "Exists": "Does not exist!"  );
 callback(o);
 });
 
 bracket
 function a(arg){
 console.log(arg);
 bracket
 
 d(a);