Tcl Source Code

View Ticket
Login
Ticket UUID: 626360
Title: TIP118: expand [file attributes] on BSD & Darwin
Type: Patch Version: None
Submitter: das Created on: 2002-10-21 14:53:00
Subsystem: 37. File System Assigned To: das
Priority: 7 High Severity:
Status: Closed Last Modified: 2003-05-15 02:20:23
Resolution: Fixed Closed By: das
    Closed on: 2003-05-14 19:20:22
Description:
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
User Comments: das added on 2003-05-15 02:20:23:

File Deleted - 50237: 



File Added - 50351: tip118.patch

das added on 2003-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.

dkf added on 2003-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.

das added on 2003-05-13 16:31:57:

File Deleted - 47597: 



File Added - 50237: tip118.patch

das added on 2003-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?

vincentdarley added on 2003-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.

vincentdarley added on 2003-04-28 17:57:55:
Logged In: YES 
user_id=32170

This new patch looks fine to me, as one of the fs 
maintainers.

das added on 2003-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.

das added on 2003-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".

das added on 2003-03-21 12:12:51:

File Deleted - 34753: 



File Added - 45593: tclFCmd.patch

das added on 2003-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).

das added on 2002-11-06 19:05:23:

File Deleted - 34310: 



File Added - 34753: tclFCmd.patch

das added on 2002-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.

das added on 2002-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.

das added on 2002-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.

das added on 2002-10-21 21:53:00:

File Added - 33540: tcl.diff

Attachments: