Re: [toolbox] Extended Attributes
Status: Planning
Brought to you by:
jlaurens
From: Maxwell, A. R <ada...@pn...> - 2005-06-24 15:51:35
|
On Jun 24, 2005, at 03:55, J=E9r=F4me Laurens wrote: > I don't know how many developers are there but at least we can =20 > start a discussion. > > Tiger now supports xattrs BSD feature, and it is -really- a major =20 > step forward. > To play with xattrs, you can download > <http://www.macs.hw.ac.uk/~rpointon/osx/xattr.html> > I don't know how far those xattrs are linked to their file when =20 > moving around the internet but things are promising. > > Using xattrs, you can store any kind of meta data that are not =20 > strictly necessary but makes life so easy. > You can also store vital data such as character encoding. > I can see here another mean to store the TeX source(s) of a pdf =20 > file with the output, without forgetting the pdfsync file... That would be cool! I don't see a size limit on the xattrs, either. > AFAIK, the actual context is: > - Adam made a draft cocoa bridge Which is just a category on NSFileManager that wraps the xattr calls; =20= it needs a bit more work to be really useful. > - there is a pythonmac bridge too > - some links from google about EAs (Extended attributes) and ACLs =20 > (Access Control List) related to the linux kernel > - we already discussed a bit on the mactex list concerning =20 > specifications, but we should edit some general usage specifications. > - I did not find anything about a concrete use of xattrs to store =20 > the character encoding, The closest thing I've found is from the man page for getattrlist(2): "ATTR_CMN_SCRIPT (read/write) A text_encoding_t containing a text encoding hint for =20 the file system object's name. It is included to facilitate the =20 lossless round trip conversion of names between Unicode and =20 traditional Mac OS script encodings. The values are defined in =20 <CarbonCore/TextCommon.h>. File systems that do not have an =20 appropriate text encoding value should return =20 kTextEncodingMacUnicode. See DTS Q&A 1173 File Manager Text Encoding =20 Hints"." This appears to be the encoding of the file name itself, though; I'm =20 not familiar with the Carbon resource fork APIs, but maybe Jon Guyer =20 has some insight on this. We could probably just agree on encoding keys to be used by members =20 of this project, such as net-sourceforge-mactextoolbox-=20 characterencoding, and store either the IANA name (doesn't exist for =20 NSNonlossyASCIIStringEncoding, though) or the encoding constant itself. --=20 Adam= |