lib/bond.js
function resolveFile(path, options, mod) {
  if(path) {
    var f = Object()
    Object.defineProperties(f, {
      readStream: {
        enumerable: true,
        configurable: false,
        writeable: false,
        get: function() {
          return fs.createReadStream(path)
        }
      },
      writeStream: {
        enumerable: true,
        configurable: false,
        writeable: false,
        get: function() {
          return fs.createWriteStream(path, {flags: "a"})
        }
      },
      content: {
        enumerable: true,
        configurable: false,
        writeable: false,
        get: function() {
          return fs.readFile.sync(path).toString()
        }
      }
    })
    f.toString = function() {
      return this.content
    }
    /* open(flags[, mode][, callback])
     */
    f.open = function() {
      if(!arguments || arguments.length < 1) {
        throw(Error("flags argument is required"))
      }
      var flags = arguments[0]
      var mode = null
      var cb = null
      if(arguments.length > 2) {
        mode = arguments[1]
        cb = arguments[2]
      } else if(arguments.length > 1) {
        if(typeof arguments[1] === "number") {
          mode = arguments[1]
        } else {
          cb = arguments[1]
        }
      }
      if(cb) {
        fs.open(path, flags, mode, cb)
      } else {
        return fs.openSync(path, flags, mode)
      }
    }
    return f
  } else {
    throw(Error("File not found: "+path))
  }
}
function resolveFile(path, options, mod) {
  if(path) {
    var f = Object()
    Object.defineProperties(f, {
      readStream: {
        enumerable: true,
        configurable: false,
        writeable: false,
        get: function() {
          return fs.createReadStream(path)
        }
      },
      writeStream: {
        enumerable: true,
        configurable: false,
        writeable: false,
        get: function() {
          return fs.createWriteStream(path, {flags: "a"})
        }
      },
      content: {
        enumerable: true,
        configurable: false,
        writeable: false,
        get: function() {
          return fs.readFile.sync(path).toString()
        }
      }
    })
    f.toString = function() {
      return this.content
    }
    /* open(flags[, mode][, callback])
     */
    f.open = function() {
      if(!arguments || arguments.length < 1) {
        throw(Error("flags argument is required"))
      }
      var flags = arguments[0]
      var mode = null
      var cb = null
      if(arguments.length > 2) {
        mode = arguments[1]
        cb = arguments[2]
      } else if(arguments.length > 1) {
        if(typeof arguments[1] === "number") {
          mode = arguments[1]
        } else {
          cb = arguments[1]
        }
      }
      if(cb) {
        fs.open(path, flags, mode, cb)
      } else {
        return fs.openSync(path, flags, mode)
      }
    }
    return f
  } else {
    throw(Error("File not found: "+path))
  }
}
*************************************************************************************************
@method resolveFile
@memberof bond
@ignore