Mac specific file meta information using nio.2 attributes
mik3hall at gmail.com
Sun Jun 3 10:51:06 PDT 2012
On Jun 3, 2012, at 11:20 AM, Alan Bateman wrote:
> 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
Not familiar but I'll look into this.
> - 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).
Not an area I was into yet. Strictly attributes and related meta data. One advantage being as far as I knew it's not a project to-do item yet so I wouldn't be duplicating anyone's effort.
> - a default FileSystemDetector for file content type detection
Not sure I've seen anything on this in what I've looked at so far. Aren't the providers and filesystems pretty much bound? I'll do some searching to see what I find on this.
> - 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.
The api's I've looked at so far and included meta data for are Finder and Launch Services. Still planning on also looking into NSFileManager related meta. You seem to consider HFS+ to involve different meta these don't pick up. I will have to look into that as well.
I have been looking at the project nio source for the BSD/Unix providers and zip demo as reference and will continue to do this.
More information about the nio-dev