code: public static void writeFile(CompoundTag tag, String path, boolean compressed, boolean littleEndian) throws IOException {
          writeFile(tag, new File(path), compressed, littleEndian);
      }
docs: Writes the given root CompoundTag to the given file.
  
  @param tag          Tag to write.
  @param path         Path to write to.
  @param compressed   Whether the NBT file should be compressed.
  @param littleEndian Whether to write little endian NBT.
  @throws java.io.IOException If an I/O error occurs.