]>
Commit | Line | Data |
---|---|---|
2728d12b JH |
1 | package hotline |
2 | ||
3 | type fileType struct { | |
2d52424e JH |
4 | TypeCode string // 4 byte type code used in file transfers |
5 | CreatorCode string // 4 byte creator code used in file transfers | |
2728d12b JH |
6 | } |
7 | ||
8 | var defaultFileType = fileType{ | |
9 | TypeCode: "TEXT", | |
10 | CreatorCode: "TTXT", | |
11 | } | |
12 | ||
13 | var fileTypes = map[string]fileType{ | |
f22acf38 | 14 | ".sit": { |
2728d12b JH |
15 | TypeCode: "SIT!", |
16 | CreatorCode: "SIT!", | |
17 | }, | |
f22acf38 | 18 | ".pdf": { |
2728d12b JH |
19 | TypeCode: "PDF ", |
20 | CreatorCode: "CARO", | |
21 | }, | |
f22acf38 | 22 | ".gif": { |
3a644990 JH |
23 | TypeCode: "GIFf", |
24 | CreatorCode: "ogle", | |
25 | }, | |
f22acf38 | 26 | ".txt": { |
2728d12b JH |
27 | TypeCode: "TEXT", |
28 | CreatorCode: "ttxt", | |
29 | }, | |
f22acf38 | 30 | ".zip": { |
2728d12b JH |
31 | TypeCode: "ZIP ", |
32 | CreatorCode: "SITx", | |
33 | }, | |
f22acf38 | 34 | ".tgz": { |
3a644990 JH |
35 | TypeCode: "Gzip", |
36 | CreatorCode: "SITx", | |
37 | }, | |
f22acf38 | 38 | ".hqx": { |
3a644990 | 39 | TypeCode: "TEXT", |
2728d12b JH |
40 | CreatorCode: "SITx", |
41 | }, | |
f22acf38 | 42 | ".jpg": { |
3a644990 JH |
43 | TypeCode: "JPEG", |
44 | CreatorCode: "ogle", | |
45 | }, | |
f22acf38 JH |
46 | ".jpeg": { |
47 | TypeCode: "JPEG", | |
48 | CreatorCode: "ogle", | |
49 | }, | |
50 | ".img": { | |
3a644990 JH |
51 | TypeCode: "rohd", |
52 | CreatorCode: "ddsk", | |
53 | }, | |
f22acf38 | 54 | ".sea": { |
3a644990 JH |
55 | TypeCode: "APPL", |
56 | CreatorCode: "aust", | |
57 | }, | |
f22acf38 | 58 | ".mov": { |
3a644990 JH |
59 | TypeCode: "MooV", |
60 | CreatorCode: "TVOD", | |
61 | }, | |
f22acf38 | 62 | ".incomplete": { // Partial file upload |
16a4ad70 JH |
63 | TypeCode: "HTft", |
64 | CreatorCode: "HTLC", | |
65 | }, | |
2728d12b | 66 | } |
2d52424e JH |
67 | |
68 | // A small number of type codes are displayed in the GetInfo window with a friendly name instead of the 4 letter code | |
69 | var friendlyCreatorNames = map[string]string{ | |
7cd900d6 JH |
70 | "APPL": "Application Program", |
71 | "HTbm": "Hotline Bookmark", | |
2d52424e JH |
72 | "fldr": "Folder", |
73 | "flda": "Folder Alias", | |
74 | "HTft": "Incomplete File", | |
75 | "SIT!": "StuffIt Archive", | |
76 | "TEXT": "Text File", | |
7cd900d6 | 77 | "HTLC": "Hotline", |
2d52424e | 78 | } |