RFR 8213031: (zipfs) Add support for POSIX file permissions
Alan Bateman
Alan.Bateman at oracle.com
Mon Jan 21 14:16:03 UTC 2019
On 21/01/2019 09:17, Langer, Christoph wrote:
> :
> OK, I can see the point that in a PosixFileAttributeView as it is, there's no place for optionality/null values. However, with this approach the benefits would be that Files::get/setPosixPermissions would work and that's why I think we should pursue this. The challenge will be to find reasonable defaults.
That is how extensions are suppose to work. I think Sherman has looked
at exporting zipfs specific FileAttributeViews a couple of times. Yes,
it doesn't mean compiling against a JDK-specific API but we have several
JDK specific modules that export APIs.
> :
>
> I can imagine something like this:
> Zipfs by default implements an own view that offers dynamic, not type safe access to "zip:permissions" and we'll document this. If a user of zipfs wants to see full PosixFileAttributeView support with default values, then we should allow for a creation attribute for the zipfs that can control this. Maybe we can even allow specifying default values for user, group and permissions via zipfs attributes.
The configuration parameters that you specify to newFileSystem can work
like mount options so provide some way to specify defaults may be
useful. When you mount a fat32 file system on a Linux/Unix system then
you can usually configure things like the umask which may give you ideas.
-Alan
More information about the core-libs-dev
mailing list