File: ICDumpSuffixMap

package info (click to toggle)
netatalk 2.0.3-4
  • links: PTS
  • area: main
  • in suites: etch-m68k
  • size: 9,004 kB
  • ctags: 6,109
  • sloc: ansic: 67,633; sh: 8,424; perl: 1,187; makefile: 1,001
file content (24 lines) | stat: -rw-r--r-- 743 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
#!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;