Monday, November 08, 2010 at 12:02 AM.
system.verbs.builtins.file.copyToSystemFolder
on copyToSystemFolder (path) { on copytofolder (foldername) { destfolder = file.getSpecialFolderPath ("", foldername, true); msg ("Copying to " + destfolder); file.copy (path, destfolder + file.fileFromPath (path)); return (true)}; type = file.type (path); creator = file.creator (path); case type { 'LWFN'; 'INIT'; 'PRES'; 'PRER'; 'RDEV'; 'thng'; 'ddev' { return (copytofolder ("Extensions"))}; 'cdev' { return (copytofolder ("Control Panels"))}; 'dfil' { return (copytofolder ("Apple Menu Items"))}; 'fact' { if creator == 'MACS' { return (copytofolder ("Apple Menu Items"))}}; 'fext' { if creator == 'user' { <<special case for Network Extension return (copytofolder ("Extensions"))}}; 'ADRS' { if creator == 'GEOL' { <<special case for AppleLink Addresses return (copytofolder ("AppleLink Out Basket"))}}; 'help' { if creator == 'MACS' { <<special case for Finder Help return (copytofolder ("Extensions"))}}; 'APPL' { if creator == 'prmt' { <<special case for PrintMonitor return (copytofolder ("Extensions"))}}}; return (copytofolder ("System"))} <<not a special type, copy it to the top level of the System Folder
This listing is for code that runs in the OPML Editor environment. I created these listings because I wanted the search engines to index it, so that when I want to look up something in my codebase I don't have to use the much slower search functionality in my object database. Dave Winer.