Provide the contents of the requested file to tern
@param {string} name - the name of the file
@param {Function} next - the function to call with the text of the file
once it has been read in.
12944
function getFile(name, next) {
    // save the callback
    fileCallBacks[name] = next;

    setImmediate(function () {
        try {
            ExtractContent.extractContent(name, handleGetFile, _requestFileContent);
        } catch (error) {
            console.log(error);
        }
    });
}
85455
function getScopeData(session, offset) {
        var path = session.path,
            fileInfo = {
                type: MessageIds.TERN_FILE_INFO_TYPE_FULL,
                name: path,
                offsetLines: 0,
                text: ScopeManager.filterText(session.getJavascriptText())
            };

        ScopeManager.postMessage({
            type: MessageIds.TERN_SCOPEDATA_MSG,
            fileInfo: fileInfo,
            offset: offset
        });

        var ternPromise = ScopeManager.addPendingRequest(fileInfo.name, offset, MessageIds.TERN_SCOPEDATA_MSG);

        var result = new $.Deferred();

        ternPromise.done(function (response) {
            result.resolveWith(null, [response.scope]);
        }).fail(function () {
            result.reject();
        });

        return result;
    }
676821
protected String processFileName(String name) {

        int pos = name.lastIndexOf("/");
        if (pos >= 0) {
            name = name.substring(pos + 1);
        }
        pos = name.lastIndexOf("\\");
        if (pos >= 0) {
            name = name.substring(pos + 1);
        }
        return name;
    }
1014005
function(name) {
    var idx, length,
      header = this.headers[Utils.headerize(name)],
      result = [];

    if(!header) {
      return [];
    }

    length = header.length;
    for (idx = 0; idx < length; idx++) {
      result.push(header[idx].raw);
    }

    return result;
  }
415671
function (args, callback) {
        ternserver.addFile(args.file, args.source);
        callback({request: 'addFile'}); //$NON-NLS-1$
      }
67693
private static void getFilesByNameRecursive(Collection<File> filesList, File path, String name)
    {
        Optional.ofNullable(path.listFiles()).ifPresent(files -> Arrays.asList(files).forEach(content ->
        {
            if (content.isFile() && content.getName().equals(name))
            {
                filesList.add(content);
            }
            else if (content.isDirectory())
            {
                getFilesByNameRecursive(filesList, content, name);
            }
        }));
    }
19102
function includedFiles(name){
    let includes=this.getIncludes(this.getFile(name));
    let ret=includes.map(include => {
        let ret = {
            absolute:path.join(name,"../",include.relPath),
            relative:include.relPath,
            match:include.match
        }
        return ret;
    })
    return ret;
}
1338646
function nextCreate(
  filesPromise,
  serveStaticFile,
  serveFile,
  injector,
  basePath,
  urlRoot,
  upstreamProxy
) {
  var prevMiddleware = prevCreate(
    filesPromise,
    serveStaticFile,
    serveFile,
    injector,
    basePath,
    urlRoot,
    upstreamProxy
  );
  return function nextMiddleware(request, response, next) {
    var requestUrl = request.normalizedUrl.replace(/\?.*/, '');
    var prevWrite;
    var prevEnd;
    requestUrl = requestUrl.substr(urlRoot.length - 1);
    if (requestUrl === '/context.html' &&
        toplevelScriptIntegrity &&
        toplevelScriptIntegrity.startsWith('sha') &&
        stylesheetIntegrity &&
        stylesheetIntegrity.startsWith('sha')) {
      prevWrite = response.write;
      prevEnd = response.end;
      // eslint-disable-next-line no-param-reassign
      response.write = function nextWrite(chunk, encoding, callback) {
        prevWrite.call(response, addIntegrityTags(chunk), encoding, callback);
      };
      response.end = function nextEnd(chunk, encoding, callback) {
        prevEnd.call(response, addIntegrityTags(chunk), encoding, callback);
      };
    }
    return prevMiddleware(request, response, next);
  };
}
717584
def _parse_next_filename(filename):
        
        components = filename.split(os.sep)
        section, filename = components[-2:]
        section = unsanitize_section(section)
        assert section in sections, f("Unknown section {section}")

        fields = [x.strip() for x in filename.split(".")]
        assert len(fields) >= 4, f("Can't parse 'next' filename! filename {filename!r} fields {fields}")
        assert fields[-1] == "rst"

        metadata = {"date": fields[0], "nonce": fields[-2], "section": section}

        for field in fields[1:-2]:
            for name in ("bpo",):
                _, got, value = field.partition(name + "-")
                if got:
                    metadata[name] = value.strip()
                    break
            else:
                assert False, "Found unparsable field in 'next' filename: " + repr(field)

        return metadata
1059866
function(name){
			// create the steal, mark it as loading, then as loaded
			var stel = steal.p.make( name );
			stel.loading = true;
			convert(stel, "complete");
			
			steal.preloaded(stel);
			stel.loaded()
			return steal;
		}
970592
function parse_NameCmt(blob, length, opts) {
	if(opts.biff < 8) { blob.l += length; return; }
	var cchName = blob.read_shift(2);
	var cchComment = blob.read_shift(2);
	var name = parse_XLUnicodeStringNoCch(blob, cchName, opts);
	var comment = parse_XLUnicodeStringNoCch(blob, cchComment, opts);
	return [name, comment];
}
206447
function searchFile(name, dirList, callback) {
  if (typeof dirList === 'function') {
    callback = dirList;
    dirList = '';
  }

  if (dirList === undefined) {
    dirList = ''
  }

  if (!Array.isArray(dirList)) {
    dirList = [dirList];
  }

  var success = dirList.some(function(dir) {
    if (!dir) {
      return false;
    }
    try {
      /**
       * Don't try to optimise this to be async since any failures will be
       * passed back to the caller:
       */

      var data = fs.readFileSync(path.join(dir, name), 'utf8');

      callback(null, data);
      return true;
    } catch (e) {
      return false;
    }
  });

  if (!success) {
    return callback('Failed to find file \'' + name + '\' at specified locations:' + dirList.join(','));
  }
}
492686
function (tplContent, name) {
    if (tplContent) {
      var ret;
      try {
        ret = parser.parse(tplContent, name);
      } catch (err) {
        var e;
        if (err instanceof Error) {
          e = err;
        } else {
          e = new Error(err);
        }
        var errorStr = 'XTemplate error ';
        e.stack = errorStr + e.stack;
        e.message = errorStr + e.message;
        throw e;
      }
      return ret;
    } else {
      return {
        statements: []
      };
    }
  }
773447
function requestFindRefs(session, document, offset) {
        if (!document || !session) {
            return;
        }
        var path    = document.file.fullPath,
            fileInfo = {
                type: MessageIds.TERN_FILE_INFO_TYPE_FULL,
                name: path,
                offsetLines: 0,
                text: ScopeManager.filterText(session.getJavascriptText())
            };
        var ternPromise = getRefs(fileInfo, offset);

        return {promise: ternPromise};
    }
947996
function loadFromFile(filename) {
  var cfg = {}
  Object.assign(
    cfg,
    loadDefault(),
    JSON.parse(fs.readFileSync(filename))
  )

  return cfg
}
496296
function streamFile(namespace, fileName) {
  var file;
  if (namespace) {
    file = path.join(namespace, fileName);
  } else {
    file = fileName;
  }
  var deferred = q.defer();
  var paramsStream = {
    Bucket: config.bucket,
    Key: file
  };
  try {
    var stream = awsClient.downloadStream(paramsStream);
    deferred.resolve(stream);
  } catch (error) {
    console.log(error);
    deferred.reject(error);
  }
  return deferred.promise;
}
247737
function(name, value) {

        if ( typeof(name) == 'string' && /\./.test(name) ) {
            var keys        = name.split(/\./g)
                , newObj    = {}
                , str       = '{'
                , _count    = 0;

            for (var k = 0, len = keys.length; k<len; ++k) {
                str +=  "\""+ keys.splice(0,1)[0] + "\":{";

                ++_count;
                if (k == len-1) {
                    str = str.substr(0, str.length-1);
                    str += "\"_content_\"";
                    for (var c = 0; c<_count; ++c) {
                        str += "}"
                    }
                }
            }

            newObj = parseDataObject(JSON.parse(str), value);
            local._data = merge(local._data, newObj);

        } else if ( typeof(local._data[name]) == 'undefined' ) {
            local._data[name] = value
        }
    }