对类HTML文件进行资源加载注入
@param file
@param include
7376
function injectAutoLoad(file, include) {
        var depList = getDepList(file);
        var asyncList = getAsyncList(file);
        var jsList = [];
        var cssList = [];
        //将include资源添加入异步资源
        asyncList = asyncList.concat(include);
        asyncList = asyncList.filter(function (async, index) {
            //去除重复资源
            if (asyncList.indexOf(async) !== index) {
                return false;
            }
            //将样式表资源强制设定为同步加载，避免异步加载样式表
            if (async.isCssLike) {
                depList.push(async);
                return false;
            }
            return true;
        });
        //生成同步资源引用列表
        var usedPkg = {};
        var usedSync = {};
        depList.forEach(function (dep) {
            var res = ret.map.res[dep.getId()];
            res.id = dep.getId();
            usedSync[dep.getId()] = true;
            if (res.pkg && ret.map.pkg[res.pkg]) {
                if (usedPkg[res.pkg]) {
                    return true;
                }
                ret.map.pkg[res.pkg].has.forEach(function (has) {
                    usedSync[has] = true;
                });
                usedPkg[res.pkg] = true;
                res = ret.map.pkg[res.pkg];
            }
            if (dep.isJsLike)
                jsList.push(res);
            else if (dep.isCssLike)
                cssList.push(res);
        });
        asyncList = asyncList.filter(function (async) {
            return !usedSync[async.getId()];
        });
        var content = file.getContent();
        content = injectCss(cssList, content);
        if (settings.useSiteMap) {
            content = injectSiteAsync(content);
        }
        else {
            content = injectAsync(asyncList, content, usedSync, file.subpath);
        }
        content = injectJs(jsList, content);
        file.setContent(content);
    }
444552
def include_file(name, indent)
      if (full_name = find_include_file(name))
        content = File.open(full_name) {|f| f.read}
        # strip leading '#'s, but only if all lines start with them
        if content =~ /^[^#]/
          content.gsub(/^/, indent)
        else
          content.gsub(/^#?/, indent)
        end
      else
        $stderr.puts "Couldn't find file to include: '#{name}'"
        ''
      end
    end
1141644
public static void load(File file)
    {
        try(FileInputStream inputStream = new FileInputStream(file))
        {
            LineIterator it = IOUtils.lineIterator(inputStream, "UTF-8");
            while (it.hasNext())
            {
                String line = it.next();
                if (!line.startsWith("#") && !line.trim().isEmpty())
                {
                    add(line);
                }
            }
        }
        catch (Exception e)
        {
            throw new WindupException("Failed loading archive ignore patterns from [" + file.toString() + "]", e);
        }
    }
1265577
public void write(File file) throws IOException {
        try (InputStream inputStream = getInputStream()) {
            IoUtils.copy(inputStream, file);
        }
    }
1001753
public void addFile(String sourceFolder, String name, ClassLoaderFile file) {
		Assert.notNull(sourceFolder, "SourceFolder must not be null");
		Assert.notNull(name, "Name must not be null");
		Assert.notNull(file, "File must not be null");
		removeAll(name);
		getOrCreateSourceFolder(sourceFolder).add(name, file);
	}
19479
def include_file(self, uri, **kwargs):
        """"""

        _include_file(self.context, uri, self._templateuri, **kwargs)
816517
public void addExclude(String exclude) {

        exclude = normalizePath(exclude);
        m_excludes.add(exclude);
        m_allPaths.add(exclude);
    }
255077
function(file) {
    var link = document.createElement("link")
    link.href = file
    link.type = "text/css"
    link.rel = "stylesheet"
    link.media = "screen,print"
    document.getElementsByTagName("head")[0].appendChild(link)
  }
784853
public void checkHtmlFile(File file, boolean asUTF8) throws IOException,
            SAXException {
        validator.reset();
        InputSource is = new InputSource(new FileInputStream(file));
        is.setSystemId(file.toURI().toURL().toString());
        if (asUTF8) {
            is.setEncoding("UTF-8");
        }
        checkAsHTML(is);
    }
1324931
private static void addFile(File file, String path, ZipOutputStream out) throws UtilException {
		BufferedInputStream in = null;
		try {
			in = FileUtil.getInputStream(file);
			addFile(in, path, out);
		} finally {
			IoUtil.close(in);
		}
	}
1135212
private static String join(String delimToUse, INCLUDE... include) {
        String delim = "";
        StringBuilder sb = new StringBuilder();
        for (INCLUDE i : include) {
            sb.append(delim).append(i);
            delim = delimToUse;
        }
        return sb.toString();
    }
782365
def p_include(p):
    
    if ENABLED:
        p[0] = include_file(p[2], p.lineno(2), local_first=True)
    else:
        p[0] = []
        p.lexer.next_token = '_ENDFILE_'
1206241
function include(ckey, file) {
    var
      match = file.match(INCNAME)

    file = match && match[1]
    if (file) {
      var ch = file[0]
      if ((ch === '"' || ch === "'") && ch === file.slice(-1))
        file = file.slice(1, -1).trim()
    }
    if (file) {
      result.insert = file
      result.once = !!ckey[8]
    }
    else
      emitError('Expected filename for #' + ckey + ' in @')
  }
1058470
private void importSingleFile(String file, String toplevelCorpusName,
    long corpusRef)
  {

    BinaryImportHelper preStat = new BinaryImportHelper(file, getRealDataDir(),
      toplevelCorpusName,
      corpusRef, mimeTypeMapping);
    getJdbcTemplate().execute(BinaryImportHelper.SQL, preStat);

  }
1084930
public void addFile(String path, File file) throws IOException {
    addFile(path, file, null);
  }
418179
public function load($file) {
		$this->file = $file;

		$msg = array();
		@include($file);

		$this->msg = $msg;
	}
932496
function write(file, data) {
  writeFileSync(file, data);

  console.log(
    `✓ ${relative(__dirname + "/../", file)} (${bytes(statSync(file).size)})`
  );
}