Sophie

Sophie

distrib > Fedora > 14 > x86_64 > by-pkgid > 1840e1f061d4543bc35cf33ea72eb707 > files > 92

netatalk-2.1.3-1.fc14.x86_64.rpm

#!/usr/bin/perl
#
# ICDumpMap
#     ---  Dump suffix mappings from your Internet Config extension.
#
# iNOUE Koich! <inoue@ma.ns.musashi-tech.ac.jp>
#

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;