@Override
    String codeOneFile (String packName, String filePath, List<TypeEnum> enums, List<TypeStruct> structs)
    {
        fileIncludes.clear();
        TreeSet<String> imps = new TreeSet<String>();
        String body = codeOneFileBody(enums, structs, imps);
        if (body.equals(empty))
        {
            return empty;
        }
        if (enums.size() > 0)
        {
            String codePath = getContext().findBuildInType(TypeID.INT32).getRedirect().getCodePath();
            fileIncludes.add(codePath);
        }
        String[] names;
        names = packName.split(dotToken);
        String relatives = empty;
        for (int i = 0; i < names.length; i++)
        {
            relatives += "../";
        }
        StringBuilder includes = new StringBuilder();
        Iterator<String> iter = fileIncludes.descendingIterator();
        while (iter.hasNext())
        {
            String inc = iter.next();
            String s = snippetTryGet(Key.FILE_INCLUDE);
            if (s.equals(empty))
                continue;
            if (inc.equals(empty))
                continue;
            s = replace(s, Token.Name, inc);
            s = replace(s, Token.NameUpper, relatives);
            includes.append(s);
        }

        List<String> packNames = new LinkedList<String>();
        if (packNameNested)
        {

            for (String n : names)
                packNames.add(n);
        }
        else
        {
            packNames.add(packName);
        }

        String ifndef = filePath;
        ifndef = ifndef.toUpperCase();
        ifndef = replace(ifndef, "\"", empty);
        ifndef = replace(ifndef, "//", "_");
        ifndef = replace(ifndef, "/", "_");
        ifndef = replace(ifndef, dotToken, "_");
        String s = snippet.tryGet(Key.FILE,
                                  "//Error: No template named '" + Key.FILE + "' in " + snippet.getSnippetPath());
        s = replace(s, Token.Define, ifndef);
        s = replace(s, Token.Pack, codeOneFilePack(packNames, body));
        s = replace(s, Token.Includes, includes.toString());
        return s;
    }