public OutputStream createBinaryFile(Location loc,
                                         String pkg,
                                         File relPath) throws IOException {
        File file = (pkg.length() == 0)
                        ? relPath
                        : new File(nameToPath(pkg), relPath.getPath());
        return getOutputStream(loc, file.getPath(), null, FileKind.OTHER);
    }