r/JavaProgramming • • 4d ago

I got tired of writing the same Java file-handling code, so I built a small utility library — looking for feedback

Hey everyone!

While working on my Java projects, I got annoyed at how often I had to write the same kind of code for everyday file operations and text processing. Reading and writing files, appending content, copying files, counting words, searching directories, and getting file metadata started feeling repetitive.

So I decided to build FilzaFiles, a small Java utility library that wraps these common operations into reusable methods.

Some things it currently supports:

  • Creating, reading, writing, appending, copying, moving, and deleting files
  • Creating file backups
  • Counting words, Unicode characters, lines, paragraphs, and approximate sentences
  • Replacing text in strings and files
  • Recursively searching by filename or extension
  • Inspecting file metadata

I have released v0.1.0 with a downloadable JAR. I also tested it with a separate Java application and ran 22 integration checks, all of which passed.

Project: https://github.com/Peshimam-Ashar-Mohammed/FilzaFiles

Download: https://github.com/Peshimam-Ashar-Mohammed/FilzaFiles/releases/download/v0.1.0/filzafiles-0.1.0.jar

It requires Java 21 or later. It isn't on Maven Central yet, so the README explains how to integrate the JAR into a regular Java project or a Maven project.

I'd genuinely appreciate feedback from other Java developers:

  • Does the API feel intuitive?
  • Are there any design decisions you'd change?
  • What edge cases or tests am I missing?
  • Are there useful file or text utilities you'd want to see added?

This is my first release of the library, and I'm hoping to improve it based on real developer feedback. Criticism is welcome!

Thanks for checking it out!

4 Upvotes

1 comment sorted by

1

u/investigatormaker 4d ago

For FilzaFiles, the first thing Java reviewers will ask is what it adds over the NIO Files class, which already has readString, writeString, copy, move and walk. A short README table mapping each FilzaFiles method to the plain NIO call it replaces, plus how you handle IOException (rethrow unchecked, return a result, or keep it checked), would answer that up front and make the feedback you get sharper. Until it is on Maven Central, JitPack can serve the GitHub release as a Maven or Gradle dependency.

By the way, I make ThreadFox: your AI researches, writes and publishes Reddit outreach from your Chrome within an authorized job, and the free plan for FilzaFiles finds the Reddit communities whose rules allow a post about it. https://threadfox.vip/p/dpmfv

Does the approximate sentence count use BreakIterator or your own rules?