--- old/src/jdk.zipfs/share/classes/module-info.java 2019-02-08 16:06:14.360100900 +0100 +++ new/src/jdk.zipfs/share/classes/module-info.java 2019-02-08 16:06:13.419132100 +0100 @@ -41,6 +41,31 @@ * * The URI {@link java.net.URI#getScheme scheme} that identifies the ZIP file system is {@code jar}. * + *

Posix Support

+ * + * File systems created by the Zip file system provider have a built in support + * for POSIX permissions. It is possible to query a Path object inside a Zip + * file for the attribute {@code storedPermissions}. The value of the attribute + * will be of type {@link java.util.Set}< + * {@link java.nio.file.attribute.PosixFilePermission}>. As POSIX permission + * information is optional for a Zip entry, the attribute value will be + * {@code null} in case no permission information exists in the Zip file. + * + * For extended POSIX support, allowing to use + * {@link java.nio.file.attribute.PosixFileAttributeView} and taking advantage + * of {@link java.nio.file.Files#setPosixFilePermissions} or + * {@link java.nio.file.Files#getPosixFilePermissions}, it is possible to create + * a Zip file system with the property {@code posix} set to {@code true} + * In that case, certain defaults apply. The owner of a file will be set to a + * UserPrincipal with its name set to the value of + * {@code System.getProperty("user.name")}. The group will have the name + * {@code <zipfs_default>}. The default for POSIX permissions, in case + * no data is associated with the zip file entry, will be a Set containing + * {@link java.nio.file.attribute.PosixFilePermission#OWNER_READ}, + * {@link java.nio.file.attribute.PosixFilePermission#OWNER_WRITE} and + * {@link java.nio.file.attribute.PosixFilePermission#GROUP_READ}. + * It is possible to override the defaults using the properties specified below. + * *

Zip File System Properties

* * The following properties may be specified when creating a Zip @@ -79,6 +104,45 @@ * names of the entries in the Zip or JAR file. * * + * + * posix + * java.lang.Boolean + * false + * + * If the value is {@code true}, the created Zip file system will support + * the {@link java.nio.file.attribute.PosixFileAttributeView}. + * + * + * + * defaultOwner + * java.nio.file.attribute.UserPrincipal + * A user principal with its name set to the value of System property + * "{@code user.name}" + * + * This value will override the default value for owner, in case the Zip + * file system is created with option {@code posix=true}. + * + * + * + * defaultGroup + * java.nio.file.attribute.GroupPrincipal + * A group principal with its name set to {@code <zipfs_default>} + * + * This value will override the default value for group, in case the Zip + * file system is created with option {@code posix=true}. + * + * + * + * defaultPermissions + * java.util.Set + * A set of {@code PosixFilePermission#OWNER_READ}, + * {@code PosixFilePermission#OWNER_WRITE} and + * {@code PosixFilePermission#GROUP_READ} + * + * This value will override the default value for permissions, in case the Zip + * file system is created with option {@code posix=true}. + * + * * * *