1 |
#!perl |
2 |
# |
3 |
# ICDumpMap |
4 |
# --- Dump suffix mappings from your Internet Config extension. |
5 |
# |
6 |
# iNOUE Koich! <inoue@ma.ns.musashi-tech.ac.jp> |
7 |
# |
8 |
|
9 |
use Mac::InternetConfig; |
10 |
|
11 |
open MAP, ">AppleVolumes"; |
12 |
printf MAP "%-9s \"%4s\" \"%4s\" %-30s %-25s %-15s\n\n", |
13 |
".", "TEXT", "ttxt", "ASCII Text", "SimpleText", "text/plain"; |
14 |
print MAP "\# The following lines are extracted from Internet Config Preference.\n\n"; |
15 |
for my $entry (keys %InternetConfigMap) { |
16 |
next unless $entry->extension =~ /^\./; |
17 |
$_ = sprintf "%-9s \"%4s\" \"%4s\" %-30s %-25s %-15s", |
18 |
$entry->extension, $entry->file_type, $entry->file_creator, |
19 |
$entry->entry_name, $entry->creator_app_name, |
20 |
$entry->MIME_type; |
21 |
s/\s*$/\n/; |
22 |
print MAP; |
23 |
} |
24 |
close MAP; |