#!perl # # ICDumpMap # --- Dump suffix mappings from your Internet Config extension. # # iNOUE Koich! # use Mac::InternetConfig; open MAP, ">AppleVolumes"; printf MAP "%-9s \"%4s\" \"%4s\" %-30s %-25s %-15s\n\n", ".", "TEXT", "ttxt", "ASCII Text", "SimpleText", "text/plain"; print MAP "\# The following lines are extracted from Internet Config Preference.\n\n"; for my $entry (keys %InternetConfigMap) { next unless $entry->extension =~ /^\./; $_ = sprintf "%-9s \"%4s\" \"%4s\" %-30s %-25s %-15s", $entry->extension, $entry->file_type, $entry->file_creator, $entry->entry_name, $entry->creator_app_name, $entry->MIME_type; s/\s*$/\n/; print MAP; } close MAP;