]> git.r.bdr.sh - rbdr/mobius/blob - hotline/file_types.go
Migrate user account yaml files to new Access flag format if needed
[rbdr/mobius] / hotline / file_types.go
1 package hotline
2
3 type fileType struct {
4 TypeCode string // 4 byte type code used in file transfers
5 CreatorCode string // 4 byte creator code used in file transfers
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 },
22 ".gif": {
23 TypeCode: "GIFf",
24 CreatorCode: "ogle",
25 },
26 ".txt": {
27 TypeCode: "TEXT",
28 CreatorCode: "ttxt",
29 },
30 ".zip": {
31 TypeCode: "ZIP ",
32 CreatorCode: "SITx",
33 },
34 ".tgz": {
35 TypeCode: "Gzip",
36 CreatorCode: "SITx",
37 },
38 ".hqx": {
39 TypeCode: "TEXT",
40 CreatorCode: "SITx",
41 },
42 ".jpg": {
43 TypeCode: "JPEG",
44 CreatorCode: "ogle",
45 },
46 ".jpeg": {
47 TypeCode: "JPEG",
48 CreatorCode: "ogle",
49 },
50 ".img": {
51 TypeCode: "rohd",
52 CreatorCode: "ddsk",
53 },
54 ".sea": {
55 TypeCode: "APPL",
56 CreatorCode: "aust",
57 },
58 ".mov": {
59 TypeCode: "MooV",
60 CreatorCode: "TVOD",
61 },
62 ".incomplete": { // Partial file upload
63 TypeCode: "HTft",
64 CreatorCode: "HTLC",
65 },
66 }
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{
70 "APPL": "Application Program",
71 "HTbm": "Hotline Bookmark",
72 "fldr": "Folder",
73 "flda": "Folder Alias",
74 "HTft": "Incomplete File",
75 "SIT!": "StuffIt Archive",
76 "TEXT": "Text File",
77 "HTLC": "Hotline",
78 }