]>
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{ | |
14 | "sit": { | |
15 | TypeCode: "SIT!", | |
16 | CreatorCode: "SIT!", | |
17 | }, | |
18 | "pdf": { | |
19 | TypeCode: "PDF ", | |
20 | CreatorCode: "CARO", | |
21 | }, | |
3a644990 JH |
22 | "gif": { |
23 | TypeCode: "GIFf", | |
24 | CreatorCode: "ogle", | |
25 | }, | |
2728d12b JH |
26 | "txt": { |
27 | TypeCode: "TEXT", | |
28 | CreatorCode: "ttxt", | |
29 | }, | |
30 | "zip": { | |
31 | TypeCode: "ZIP ", | |
32 | CreatorCode: "SITx", | |
33 | }, | |
34 | "tgz": { | |
3a644990 JH |
35 | TypeCode: "Gzip", |
36 | CreatorCode: "SITx", | |
37 | }, | |
38 | "hqx": { | |
39 | TypeCode: "TEXT", | |
2728d12b JH |
40 | CreatorCode: "SITx", |
41 | }, | |
3a644990 JH |
42 | "jpg": { |
43 | TypeCode: "JPEG", | |
44 | CreatorCode: "ogle", | |
45 | }, | |
46 | "img": { | |
47 | TypeCode: "rohd", | |
48 | CreatorCode: "ddsk", | |
49 | }, | |
50 | "sea": { | |
51 | TypeCode: "APPL", | |
52 | CreatorCode: "aust", | |
53 | }, | |
54 | "mov": { | |
55 | TypeCode: "MooV", | |
56 | CreatorCode: "TVOD", | |
57 | }, | |
16a4ad70 JH |
58 | "incomplete": { // Partial file upload |
59 | TypeCode: "HTft", | |
60 | CreatorCode: "HTLC", | |
61 | }, | |
2728d12b | 62 | } |
2d52424e JH |
63 | |
64 | // A small number of type codes are displayed in the GetInfo window with a friendly name instead of the 4 letter code | |
65 | var friendlyCreatorNames = map[string]string{ | |
66 | "fldr": "Folder", | |
67 | "flda": "Folder Alias", | |
68 | "HTft": "Incomplete File", | |
69 | "SIT!": "StuffIt Archive", | |
70 | "TEXT": "Text File", | |
71 | } |