Skip to content
Tcl Source Code View Ticket
Login

View Ticket

TIP118: expand [file attributes] on BSD & Darwin

Closed / Fixed626360ffffffffffffffffffffffffffffffffffCreated 24 years agoUpdated 24 years ago
Descriptionplain2002-10-21 14:53:00
The attached patch adds suport for [file attributes -
readonly] (i.e. the user immutable flag) on any unix system 
supporting chflags(), this includes BSD >= 4.4 and Darwin/
MacOSX (where this is the flag corresponding to the file 
locked state in HFS+).

On systems supporting getattrlist(), i.e. currently only pure 
Darwin & Mac OSX, the patch adds support for the 
MacOS9 style [file attributes -creator -type -hidden] via 
POSIX level APIs that don't require linking with Carbon.

Tested the patch on the SF compilefarm on
[Alpha] Linux 2.4 (Debian 3.0), where none of the APIs 
are available and no ill effects ensue
[x86] FreeBSD (4.7-RC), where chflags() is available and 
[file attributes -readonly] can successfully be interrogated, 
(but not set due to permission issues at sourceforge)
as well as on both MacOSX 10.1.5 and 10.2 where the 
complete functionality is available.

docs will need changing if this is accepted for checkin, 
that's not in the patch yet.

It'd be great if this could make it into 8.4.1
dasplain2002-10-21 21:53:00
File Added - 33540: tcl.diff
dasplain2002-10-22 20:03:12
File Deleted - 33540: 



File Added - 33604: tcl.diff

Logged In: YES 
user_id=90580

updated patch with fixes to Tcl_GetOSTypeFromObj & 
Tcl_NewOSTypeStringObj to deal properly with strings of length 
0-4.
dasplain2002-10-31 07:52:35
File Deleted - 33604: 



File Added - 34310: tcl.diff

Logged In: YES 
user_id=90580

updated patch with fixes and resource fork support (on Darwin):
- [file attributes -rsrclength] attribute added, can be retrieved as 
well as set to 0 (to strip the resource fork).
- [file attributes] changed to no longer abort on errors when 
retrieving all possible attributes, now returns just those attributes 
that could be read witout error.
- [file copy] preserves Finder attributes and resource fork.
- macRoman encoding used in OSType<->string funcs.
dasplain2002-11-06 19:05:22
Logged In: YES 
user_id=90580

updated patch with:
- documentation changes
- classic mac port of attribute -rsrclength
- fixes to classic mac OSType string representation
- get/setattrlist now follow symlinks
- [file attributes] error handling fix.
dasplain2002-11-06 19:05:23
File Deleted - 34310: 



File Added - 34753: tclFCmd.patch
dasplain2003-03-21 12:12:50
Logged In: YES 
user_id=90580

Updated patch to the current 8.5a0 HEAD, since the old patch 
didn't apply completely cleanly anymore.
To clarify things, renamed occurrences of "Finder" to "MacOSX" 
in static proc names (still slightly inaccurate because everything 
will also work on a pure Darwin system).
dasplain2003-03-21 12:12:51
File Deleted - 34753: 



File Added - 45593: tclFCmd.patch
dasplain2003-04-03 07:20:13
Logged In: YES 
user_id=90580

assigning to Jeff for review in his capacity as co-maintainer for 
"35. File System".
dasplain2003-04-13 12:20:31
File Deleted - 45593: 



File Added - 47597: tip118.patch

Logged In: YES 
user_id=90580

attached updated patch implementing Mac OS X specific parts 
of TIP 118 in a separate file.
vincentdarleyplain2003-04-28 17:57:55
Logged In: YES 
user_id=32170

This new patch looks fine to me, as one of the fs 
maintainers.
vincentdarleyplain2003-05-08 17:03:48
Logged In: YES 
user_id=32170

I did a fair amount of testing on this last night, and the 
patch looks good.  Minor quibble is it appears to 
introduce a few compiler warnings, but I think we 
should apply asap.
dasplain2003-05-13 16:31:56
Logged In: YES 
user_id=90580

updated the patch so that it applies cleanly to the current HEAD

Jeff, both Vince and Jim have approved the patch, did you want 
to take a look at this or can I go ahead and commit?
dasplain2003-05-13 16:31:57
File Deleted - 47597: 



File Added - 50237: tip118.patch
dkf Ticket [626360ffff]: 1 change [History diff]2003-05-13 21:43:05
dkfplain2003-05-13 21:43:06
Logged In: YES 
user_id=79902

Jim and Vince both like it?  Then it's probably good enough
for me too.  Stop dithering and commit to the HEAD.  But DO
NOT apply this patch to the 8.4 branch, which should be
feature-frozen on all platforms.
dasplain2003-05-15 02:20:22
Logged In: YES 
user_id=90580

updated patch with tests of new TIP118 features added (in 
unixFCmd.test and new macOSXFCmd.test).

committed to HEAD.
dasplain2003-05-15 02:20:23
File Deleted - 50237: 



File Added - 50351: tip118.patch
Log in (anonymous is fine) to add a comment.

Attachments: