Mac specific file meta information using nio.2 attributes

Alan Bateman Alan.Bateman at oracle.com
Sun Jun 3 09:20:00 PDT 2012


On 03/06/2012 04:05, Michael Hall wrote:
> I have put together something to provide some Mac platform api meta data using nio.2 and a little jni. Possibly it's to the point where there might be some feedback.
>
The NIO file system API has many extension points, one of which is to 
interpose on the default provider, as you are doing, to add additional 
features. I looked briefly at your zip file and I would say that this is 
a good approach for prototyping and to help converge on a useful set of 
additional attributes that should be supported on this platform.

For OpenJDK then we will need add better support for HFS+ and Mac 
specific file system features. If you look at what has been done for 
Solaris, Linux and Windows already then you'll see that the default 
provider on these platforms supports several file system and platform 
specific features beyond what is required by the specification. For Mac 
and HFS+ then things that come to mind are:

- support for Unciode Normalization Form D and case insensitive file 
name comparison

- a kqueue based WatchService (the Mac port is using the brain dead 
polling implementation that we have for platforms that don't have 
support for events from the file system).

- a default FileSystemDetector for file content type detection

- support for HFS+ file attributes like birth time and user flags. There 
is also extended attributes and ACLs. This seems to be the area that you 
are looking into now and it would be great to get the support for these 
attributes into the default provider (assuming they make sense of 
course). If you look at the existing code then you'll see how the Unix* 
provider is extended.

-Alan.


More information about the nio-dev mailing list