RFR 8182117 : Document Zip File System Properties
Alan Bateman
Alan.Bateman at oracle.com
Tue Feb 5 08:31:21 UTC 2019
A few comments
On 04/02/2019 19:36, Lance Andersen wrote:
> :
>
>
> + * The Zip file system provider treats a Zip or JAR file as a file system
> + * providing the ability to manipulate its contents.
It might be a bit clearer to reduce this to: "The Zip file system
provider treats the contents of a Zip or JAR file as a file system".
> *
> + * The {@linkplain java.nio.file.FileSystems FileSystems} {@code newFileSystem}
> + * static factory methods can be used to create a new Zip file system or to
> + * obtain a reference to an existing Zip file system.
or "can be used to create a zip file system or open an existing file as
a zip file system".
> + *
> + * FileSystem zipfs = FileSystems.newFileSystem(
> + * Paths.get("tennisteam.jar"), null);
You can change this to use Path.of, also might be nice to remove the
line break so it's all on one line.
> + * Files.walk(zipfs.getPath("/"))
> + * .forEach(System.out::println);
>
For clarity it might be better to create a variable, say top, for the
root directory of the zip file system. The main thing that the reader
needs to understand is that the file system is the factory to create
paths to files in that file system.
-Alan
More information about the core-libs-dev
mailing list