[prev in list] [next in list] [prev in thread] [next in thread] 

List:       openjdk-nio-dev
Subject:    Integrated: JDK-8030048: (fs) Support UserDefinedFileAttributeView/extended attributes on OS X / HFS
From:       Sebastian Stenzel <github.com+1204330+overheadhunter () openjdk ! java ! net>
Date:       2021-01-16 8:39:15
Message-ID: hImrxI4DzelMQHvE5Un62nn5PYU53_dehd0plrCHgMo=.6735eb78-daa8-4997-afb1-60237adcf6b5 () github ! com
[Download RAW message or body]

On Sun, 10 Jan 2021 17:17:16 GMT, Sebastian Stenzel \
<github.com+1204330+overheadhunter@openjdk.org> wrote:

> This adds support for UserDefinedFileAttributeView on macOS 10.4 and newer.
> 
> While the main audience for this will probably be macOS users, the relevant changes \
> take place in (mostly existing) classes carrying BSD in their names as none of this \
> is really macOS-specific. 
> Code is mostly copied from the Linux implementation except for three differences:
> 1. max length for attribute names is 127 bytes
> 2. we know for sure that APFS and HFS+ support extended attributes, therefore we \
> [simply return `true`](https://github.com/skymatic/jdk/blob/7a3619df12853bd3a44e4f49 \
> c98f35e15bceb652/src/java.base/macosx/classes/sun/nio/fs/BsdFileStore.java#L114-L118) \
> from `supportsFileAttributeView(UserDefinedFileAttributeView.class)` for these two \
> FS types, while for all other types support is determined experimentally in \
> [`isExtendedAttributesEnabled(...)`](https://github.com/skymatic/jdk/blob/7a3619df12 \
> 853bd3a44e4f49c98f35e15bceb652/src/java.base/macosx/classes/sun/nio/fs/BsdFileStore.java#L83-L100)
>  3. For the aforementioned check the new `UnixConstants.ENOATTR` is added, which \
> [seems to be macOS and \
> BSD-specific](https://mail-index.netbsd.org/tech-kern/2012/04/30/msg013090.html). 
> As discussed in the mailing list, for ease of tracking changes it is not a goal of \
> this patch to modernize the existing Linux implementation, nor to deduplicate \
> anything.

This pull request has now been integrated.

Changeset: afd3f78a
Author:    Sebastian Stenzel <sebastian.stenzel@skymatic.de>
Committer: Alan Bateman <alanb@openjdk.org>
URL:       https://git.openjdk.java.net/jdk/commit/afd3f78a
Stats:     204 lines in 7 files changed: 198 ins; 0 del; 6 mod

8030048: (fs) Support UserDefinedFileAttributeView/extended attributes on OS X / HFS+

Reviewed-by: alanb

-------------

PR: https://git.openjdk.java.net/jdk/pull/2017


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic