OSDir

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [compress] High Level API for Archives


Hi all

I've introduced a whole lot of infrastructure code with

https://github.com/apache/commons-compress/commit/f62c523154dfedcf49a87a865db545bb8c55e795

but the interface now looks nicer to me, in particual see

        try (Sink<File> sink = FileToArchiveSink.forFile(args[1], new File(args[2]))) {
            Archive.directory(new File(args[0]))
                .to(sink);
        }

in ArchiveCli - all of this in a new examples package. No unit tests,
but I've tried the new cli with all formats we support writing for. Only
archive creation is there, yet, but the opposite direction will reuse a
lot of the infrastructure.

If this is something that looks acceptable I'll add expansion and remove
the other two classes. If not, we'll need to think about an acceptable
example API a bit longer. :-)

Cheers

        Stefan

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@xxxxxxxxxxxxxxxxxx
For additional commands, e-mail: dev-help@xxxxxxxxxxxxxxxxxx