lib/rdp-file.js
function buildRdpFile(config) {
  var deferred = Q.defer();
  var fileContent = getRdpFileContent(config);
  var fileName = path.normalize(os.tmpdir() + '/' + sanitize(config.address) + '.rdp');
  Q.nfcall(fs.writeFile, fileName, fileContent)
    .then(function() {
      deferred.resolve(fileName);
    })
    .fail(deferred.reject);
  return deferred.promise;
}
function buildRdpFile(config) {
  var deferred = Q.defer();
  var fileContent = getRdpFileContent(config);
  var fileName = path.normalize(os.tmpdir() + '/' + sanitize(config.address) + '.rdp');
  Q.nfcall(fs.writeFile, fileName, fileContent)
    .then(function() {
      deferred.resolve(fileName);
    })
    .fail(deferred.reject);
  return deferred.promise;
}
function buildRdpFile ( config ) { var deferred = Q . defer ( ) ; var fileContent = getRdpFileContent ( config ) ; var fileName = path . normalize ( os . tmpdir ( ) + '/' + sanitize ( config . address ) + '.rdp' ) ; Q . nfcall ( fs . writeFile , fileName , fileContent ) . then ( function ( ) { deferred . resolve ( fileName ) ; } ) . fail ( deferred . reject ) ; return deferred . promise ; }
Returns a promise that will be resolved as soon as the file is created.
@param config
@returns {promise|*|Q.promise}
Returns a promise that will be resolved as soon as the file is created .