Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8350880 (zipfs) Add support for read-only zip file systems
  3. JDK-8357908

Release Note: New Property to Construct ZIP FileSystem as read-only

XMLWordPrintable

      The ZIP file system provider is updated to allow a ZIP file system be created as a read-only or read-write file system. When creating a ZIP file system, the property name "`accessMode`" can be used with a value of "`readOnly`" or " `readWrite`" to specify the desired mode. If the property is not provided then the file system is created as a read-write file system if possible.

      The following example creates a read-only file system:

      ```
      FileSystem zipfs = FileSystems.newFileSystem(pathToZipFile, Map.of("accessMode","readOnly"));
      ```

      See the `jdk.zipfs` module description for more information on this and other properties supported by the ZIP file system provider.

            dabeaumo David Beaumont
            dabeaumo David Beaumont
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: