|
From: creedon <icr...@us...> - 2005-11-18 20:49:02
|
Update of /cvsroot/frontierkernel/odbs/frontierRoot/system/verbs/builtins/file In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv20561 Modified Files: creator type Log Message: merge from branch commercial_suite_project-branch Index: type =================================================================== RCS file: /cvsroot/frontierkernel/odbs/frontierRoot/system/verbs/builtins/file/type,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** type 13 Aug 2005 19:13:05 -0000 1.2 --- type 18 Nov 2005 20:48:48 -0000 1.3 *************** *** 1,3 **** FrontierVcsFile:1:scpt:system.verbs.builtins.file.type ! on type (path) { ÇChanges Ç8/8/05; 4:24:26 PM by TAC Çworkaround problem kernel has with Mac OS X applications that are packagkes, they have a type code and they are a folder; code cribbed from Sean Elfstrom's <sel...@im...> DuckTape Tool v0.5 on kernelCall (path) { kernel (file.type)}; if system.environment.isCarbon { // it might be a package if file.isFolder (path) { try { // in case of error fallback to kernel return (string4 (string.mid (file.readWholeFile (path + "Contents:PkgInfo"), 1, 4)))}}}; kernelCall (path)} \ No newline at end of file --- 1,3 ---- FrontierVcsFile:1:scpt:system.verbs.builtins.file.type ! on type (path) { ÇChanges Ç9/15/05; 8:57:21 PM by TAC Çadded check for files like osax Ç9/3/05; 5:42:12 PM by TAC Çadded check for Mac OS X packages; Contents:Info.plist Ç8/8/05; 4:24:26 PM by TAC Çworkaround problem kernel has with Mac OS X applications that are packages, they have a type code and they are a folder; code cribbed from Sean Elfstrom's <sel...@im...> DuckTape Tool v0.5 on kernelCall (path) { kernel (file.type)}; if system.environment.isCarbon { // it might be a package if file.isFolder (path) { Çin case of error fallback to kernel try { // like an application if file.exists (path + "Contents:PkgInfo") { return (string4 (string.mid (file.readWholeFile (path + "Contents:PkgInfo"), 1, 4)))}}; try { // like an osax if file.exists (path + "Contents:Info.plist") { local (cp = re.compile ("<key>CFBundlePackageType</key>[ \n\r\t]*<string>([^<]*)</string>")); local (s = file.readWholeFile (path + "Contents:Info.plist")); local (t = re.extract (cp, s, {1})); if t != {} { return (string4 (t))}}}}}; kernelCall (path)} \ No newline at end of file Index: creator =================================================================== RCS file: /cvsroot/frontierkernel/odbs/frontierRoot/system/verbs/builtins/file/creator,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** creator 13 Aug 2005 19:13:05 -0000 1.2 --- creator 18 Nov 2005 20:48:48 -0000 1.3 *************** *** 1,3 **** FrontierVcsFile:1:scpt:system.verbs.builtins.file.creator ! on creator (path) { ÇChanges Ç8/8/05; 4:15:09 PM by TAC Çworkaround problem kernel has with Mac OS X applications that are packagkes, they have a creator code and they are a folder; code cribbed from Sean Elfstrom's <sel...@im...> DuckTape Tool v0.5 on kernelCall (path) { kernel (file.creator)}; if system.environment.isCarbon { // it might be a package if file.isFolder (path) { try { // in case of error fallback to kernel return (string4 (string.mid (file.readWholeFile (path + "Contents:PkgInfo"), 5, 4)))}}}; kernelCall (path)} \ No newline at end of file --- 1,3 ---- FrontierVcsFile:1:scpt:system.verbs.builtins.file.creator ! on creator (path) { ÇChanges Ç9/15/05; 8:57:21 PM by TAC Çadded check for files like osax Ç9/3/05; 5:42:12 PM by TAC Çadded check for Mac OS X packages; Contents:Info.plist Ç8/8/05; 4:15:09 PM by TAC Çworkaround problem kernel has with Mac OS X applications that are packagkes, they have a creator code and they are a folder; code cribbed from Sean Elfstrom's <sel...@im...> DuckTape Tool v0.5 on kernelCall (path) { kernel (file.creator)}; if system.environment.isCarbon { // it might be a package if file.isFolder (path) { Çin case of error fallback to kernel try { // like an application if file.exists (path + "Contents:PkgInfo") { return (string4 (string.mid (file.readWholeFile (path + "Contents:PkgInfo"), 5, 4)))}}; try { // like an osax if file.exists (path + "Contents:Info.plist") { local (cp = re.compile ("<key>CFBundleSignature</key>[ \n\r\t]*<string>([^<]*)</string>")); local (s = file.readWholeFile (path + "Contents:Info.plist")); local (t = re.extract (cp, s, {1})); if t != {} { return (string4 (t))}}}}}; kernelCall (path)} \ No newline at end of file |