Artifacts Associated With Ticket 823329ffffffffffffffffffffffffffffffffff
Ticket change [506f8a60d5] (rid 125966) by vincentdarley on 2003-10-14 10:09:58:
- assignee initialized to: "das"
- cmimetype initialized to: "text/plain"
- comment initialized to:
Commands like: glob -type TEXT * are not implemented on OS X. Since it is a version of MacOS, it is capable of supporting these things. Vince. Various comments below: On Tuesday, Oct 14, 2003, at 19:40 Australia/Sydney, Vince Darley wrote: > Should this just be #ifdef'd into NativeMatchType so it compiles on the > relevant platform, or...? I don't really understand all the vagaries > of > different unix systems so am probably not the person to implement > this... the creator/type code is #ifdef MAC_OSX_TCL so the same would be appropriate, c.f tclMacOSXFCmd.c [glob -types hidden] should be properly supported as well, that's also handled by TclMacOSXGetFileAttribute() and controlled by same #ifdef also [glob -types readonly] should be handled on unices that support CHFLAGS, c.f GetReadOnlyAttribute() in tclUnixFCmd.c, this is controlled by #if defined(HAVE_CHFLAGS) && defined(UF_IMMUTABLE) > Also, by the time we're in NativeMatchType we actually only have a > native > path description (no Tcl_Obj) so we really want access to the innards > of > TclMacOSXGetFileAttribute. that's a bit of a pain, it kills code modularization for these functions... it wouldn't be hard to copy the guts out of TclMacOSXGetFileAttribute() and GetReadOnlyAttribute() into the unix NativeMatchType() but it doesn't seem to be very clean. maybe we need a native path aware versions of TclMacOSXGetFileAttribute/GetReadOnlyAttribute ? don't have much time to spend on this at the moment, maybe best to add a bug report on SF so that this doesn't get lost? we really should have thought about this when I did TIP 118...
- foundin initialized to: "obsolete: 8.4.5"
- priority initialized to: "5 Medium"
- resolution initialized to: "None"
- status initialized to: "Open"
- submitter initialized to: "vincentdarley"
- subsystem initialized to: "37. File System"
- title initialized to:
glob -types type/creator/hidden not implemented on OSX
- type initialized to: "Bug"
Ticket change [60cc76fc03] (rid 92132) by das on 2003-10-14 19:07:50:
- icomment:
Logged In: YES user_id=90580 On Tuesday, Oct 14, 2003, at 19:56 Australia/Sydney, Daniel A. Steffen wrote: > On Tuesday, Oct 14, 2003, at 19:40 Australia/Sydney, Vince Darley > wrote: >> On Tue, 14 Oct 2003, Daniel A. Steffen wrote: >>> On Monday, Oct 13, 2003, at 21:38 Australia/Sydney, Vince Darley >>> wrote: >>> >>>> The 'NativeMatchType' in tcl/unix/tclUnixFile.c needs to be updated >>>> to >>>> (somehow) access the file type/creator when running on a compatible >>>> version of Unix (i.e. Darwin). >>> >>> it should be very easy to use the new TclMacOSXGetFileAttribute() >>> from >>> TIP118 for this. >> >> Should this just be #ifdef'd into NativeMatchType so it compiles on >> the >> relevant platform, or...? > > the creator/type code is #ifdef MAC_OSX_TCL so the same would be > appropriate, c.f tclMacOSXFCmd.c > > [glob -types hidden] should be properly supported as well, that's also > handled by TclMacOSXGetFileAttribute() and controlled by same #ifdef > > also [glob -types readonly] should be handled on unices that support > CHFLAGS, c.f GetReadOnlyAttribute() in tclUnixFCmd.c, this is > controlled by #if defined(HAVE_CHFLAGS) && defined(UF_IMMUTABLE) as far as support for readonly goes, the 4 line patch below should do the trick, what do you think? this'll work on OSX and any BSD that has chflags this way [glob -type readonly] will find any files that have [file attribute -readonly] but also files that don't have any write perms (to preserve existing behaviour) >> Also, by the time we're in NativeMatchType we actually only have a >> native >> path description (no Tcl_Obj) so we really want access to the innards >> of >> TclMacOSXGetFileAttribute. > > that's a bit of a pain, it kills code modularization for these > functions... > > it wouldn't be hard to copy the guts out of > TclMacOSXGetFileAttribute() and GetReadOnlyAttribute() into the unix > NativeMatchType() but it doesn't seem to be very clean. maybe we need > a native path aware versions of > TclMacOSXGetFileAttribute/GetReadOnlyAttribute ? maybe better to make a TclMacOSXNativeMatchType() that checks for OSX specific possibilities like creator/type/hidden and put that into tclMacOSXFCmd.c and call it from the unix NativeMatchType()? That way platform specific FS code stays in tclMacOSXFCmd.c (and can potentially be shared via static functions).
- login: "das"
- mimetype: "text/plain"
- username: "das"
- icomment:
Add attachment "tclUnixFile.diff" [61dac15ad9] (rid 92319) by das on 2003-10-14 19:10:41.
Ticket change [f673cf6394] (rid 130305) by das on 2003-10-14 19:10:41:
- icomment:
File Added - 64313: tclUnixFile.diff
- login: "das"
- mimetype: "text/plain"
- username: "das"
- icomment:
Ticket change [603d5ad09d] (rid 115956) by vincentdarley on 2006-03-20 06:10:33:
- foundin changed to: "obsolete: 8.5a4"
- icomment:
Logged In: YES user_id=32170 Has this been implemented at any point? Vince.
- login: "vincentdarley"
- mimetype: "text/plain"
- username: "vincentdarley"
Add attachment "823329.diff" [1037789d52] (rid 94933) by das on 2006-03-20 21:38:53.
Ticket change [84914b3e92] (rid 117573) by das on 2006-03-20 21:38:53:
- icomment:
Logged In: YES user_id=90580 patch attached that implements this on HEAD. also fixes minor issue with pattern==NULL case of 'glob -types hidden' on unix ([glob -types hidden someFile] incorrectly returned 'someFile'). the only thing not implemented is exclusion of files hidden via HFS invisible flag from ordinary glob results (i.e. without -types hidden), to implement this it would be necessary to do always do a costly stat & getattrlist for every file traversed (as well as a major rewrite of unix TclpMatchInDirectory/ NativeMatchType), I don't think it's worth the slowdown of the most common glob cases to add this minor feature. [glob -types hidden] does however return the files with HFS invisible flag in addition to files starting with '.' will commit this tomorrow if I don't hear any objections.
- login: "das"
- mimetype: "text/plain"
- username: "das"
- icomment:
Ticket change [370b56d238] (rid 107208) by das on 2006-03-20 21:38:54:
- icomment:
File Added - 171573: 823329.diff
- login: "das"
- mimetype: "text/plain"
- username: "das"
- icomment:
Ticket change [5b3896c676] (rid 118282) by das on 2006-03-20 21:40:47:
- priority changed to: "9 Immediate"
Ticket change [44355e4ced] (rid 116684) by nobody on 2006-03-21 00:31:47:
- icomment:
Logged In: NO Sounds v. good to me, including the 'invisible' trade-off. Vince.
- login: "nobody"
- mimetype: "text/plain"
- username: "nobody"
- icomment:
Ticket change [acf9206c28] (rid 101386) by das on 2006-03-21 18:10:43:
- icomment:
Logged In: YES user_id=90580 patch committed to HEAD: * generic/tclInt.decls: implement globbing for HFS creator & type * macosx/tclMacOSXFCmd.c: codes and 'hidden' flag, as documented in * tests/macOSXFCmd.test: glob.n; objectified OSType handling in [glob] * unix/tclUnixFile.c: and [file attributes]; fix globbing for hidden files with pattern==NULL arg. [Bug 823329] * generic/tclIntPlatDecls.h: * generic/tclStubInit.c: make genstubs - login: "das"
- mimetype: "text/plain"
- resolution changed to: "Fixed"
- status changed to: "Closed"
- username: "das"
- icomment:
Ticket change [77d398a011] (rid 89839) by das on 2006-03-21 18:10:44:
- closedate changed to: "2006-03-21T11:10:44"
- closer changed to: "das"