--- old/src/jdk.zipfs/share/classes/module-info.java 2019-05-21 17:13:55.776187700 +0200
+++ new/src/jdk.zipfs/share/classes/module-info.java 2019-05-21 17:13:54.642363100 +0200
@@ -41,6 +41,42 @@
*
* The URI {@link java.net.URI#getScheme scheme} that identifies the ZIP file system is {@code jar}.
*
+ *
Support for POSIX file permissions
+ *
+ * A Zip file system supports POSIX permissions.
+ *
+ * A Zip file system that was created with default properties supports the attribute "{@code permissions}".
+ * The value of the attribute will be of type
+ * {@link java.util.Set Set}<{@link java.nio.file.attribute.PosixFilePermission PosixFilePermission}>.
+ * As POSIX permission data is optional in Zip files, its value can be {@code null} for a file.
+ * This means, no permission information is stored in the corresponding Zip entry. Files that are newly
+ * created in a Zip file system will by default have no POSIX permission data.
+ *
+ * For extended POSIX support, allowing to use
+ * {@link java.nio.file.attribute.PosixFileAttributeView PosixFileAttributeView} and taking advantage
+ * of {@link java.nio.file.Files#setPosixFilePermissions Files::setPosixFilePermissions}
+ * or {@link java.nio.file.Files#getPosixFilePermissions Files::getPosixFilePermissions},
+ * a Zip file system can be created with the property "{@code enablePosixFileAttributes}"
+ * set to {@code true}. Owner, group and permissions will then be initialized with default values.
+ * If the file system that hosts the Zip file supports retrieving file owners, the default owner of
+ * files inside the Zip file system will be the owner of the Zip file itself. Otherwise,
+ * the default owner will be a {@link java.nio.file.attribute.UserPrincipal UserPrincipal}
+ * with its name set to the value of {@code System.getProperty("user.name")}.
+ * Analogously, if the file system that hosts the Zip file supports retrieving a file's group,
+ * the default group of files inside the Zip file system will be the group of the Zip file itself.
+ * Otherwise, the default group will be a {@link java.nio.file.attribute.GroupPrincipal GroupPrincipal}
+ * with its name set to the value of the file owner's name.
+ * The default {@link java.util.Set Set} of permissions for cases when no permission data
+ * is associated with a Zip file entry will contain the permissions
+ * {@link java.nio.file.attribute.PosixFilePermission#OWNER_READ OWNER_READ},
+ * {@link java.nio.file.attribute.PosixFilePermission#OWNER_WRITE OWNER_WRITE} and
+ * {@link java.nio.file.attribute.PosixFilePermission#GROUP_READ GROUP_READ}.
+ * It is possible to override these defaults using properties as specified below.
+ * Owner, group and permission attributes can be modified for files hosted by a Zip file system. However,
+ * owner and group information are not persisted. Files that are newly
+ * created in a Zip file system will by default have no POSIX permission data, although default permissions
+ * are returned for the attribute "{@code permissions}".
+ *
* Zip File System Properties
*
* The following properties may be specified when creating a Zip
@@ -79,6 +115,44 @@
* names of the entries in the Zip or JAR file.
*
*
+ *
+ * enablePosixFileAttributes |
+ * java.lang.String |
+ * false |
+ *
+ * If the value is {@code true}, the created Zip file system will support
+ * the {@link java.nio.file.attribute.PosixFileAttributeView PosixFileAttributeView}.
+ * |
+ *
+ *
+ * defaultOwner |
+ * {@link java.nio.file.attribute.UserPrincipal UserPrincipal} or java.lang.String |
+ * null/unset |
+ *
+ * Override the default owner for entries in the Zip file system.
+ * The value can be a UserPrincipal or a String value that is used as the UserPrincipal's name.
+ * |
+ *
+ *
+ * defaultGroup |
+ * {@link java.nio.file.attribute.GroupPrincipal GroupPrincipal} or java.lang.String |
+ * null/unset |
+ *
+ * Override the the default group for entries in the Zip file system.
+ * The value can be a GroupPrincipal or a String value that is used as the GroupPrincipal's name.
+ * |
+ *
+ *
+ * defaultPermissions |
+ * {@link java.util.Set Set}<{@link java.nio.file.attribute.PosixFilePermission PosixFilePermission}>
+ * or java.lang.String |
+ * null/unset |
+ *
+ * Override the default Set of permissions for entries in the Zip file system.
+ * The value can be a Set<PosixFilePermission> or a String that is parsed by
+ * {@link java.nio.file.attribute.PosixFilePermissions#fromString PosixFilePermissions.fromString}
+ * |
+ *
*
*
*