nl_tokens: Reads thee content of a remote file . Invokes ** cat filepath ** and returns the result of the command execution as provided by the ** sshExec . command ** function .
pl_tokens: function readFileContent ( conn , filepath ) { var validateInputArg = function ( ) { if ( filepath === null || filepath . length === 0 ) { throw { "success" : false , "value" : null , "error" : new Error ( "a filepath value is required" ) } ; } else { return true ; } } ; var readRemoteFileContent = function ( ) { // the success handler var successHandler = function ( result ) { return <mask> ; } ; // the error handler var errorHandler = function ( err ) { throw err ; } ; return sshExec . command ( conn , 'cat ' + filepath ) . then ( successHandler , errorHandler ) ; } ; // main entry point return Q . fcall ( validateInputArg ) . then ( readRemoteFileContent ) ; }