Documentation
¶
Index ¶
Constants ¶
const FILENAME_MAX_LENGTH = 240
const LOCAL_CLIENT = "local"
const NAME = "erodownloader"
const NONE = "none"
const ORIG_DIR = ".orig"
const TMP_DIR = ".edtmp"
Variables ¶
var ArchiveExts = []string{".rar", ".zip", ".7z"}
common archive exts: ".rar", ".zip", ".7z"...
var CjkCharsets = []string{
"UTF-8",
"Shift_JIS",
"GB-18030",
"EUC-KR",
"EUC-JP",
"Big5",
}
In priority order.
var CommonExts = []string{}
common exts. exts for same type file are sorted by popularity order.
var FilenameRestrictedCharacterReplacement = map[rune]rune{
'/': '/',
'\\': '\',
}
var FilenameRestrictedCharacterReplacer *strings.Replacer
Replace invalid Windows filename chars to alternatives. E.g. '/' => '/', '?' => '?'
var FilepathRestrictedCharacterReplacement = map[rune]rune{
'*': '*',
':': ':',
'<': '<',
'>': '>',
'|': '|',
'?': '?',
'"': '"',
}
It's a subset of https://rclone.org/overview/#restricted-filenames-caveats . Only include invalid filename characters in Windows (NTFS).
var FilepathRestrictedCharacterReplacer *strings.Replacer
Replace invalid Windows file path chars to alternatives. Similar to FilenameRestrictedCharacterReplacer, but do not replace '/' or '\'.
var ImgExts = []string{".webp", ".png", ".jpg", ".jpeg"}
common img exts: .webp, .png, .jpg...
var IncompleteFileExts = []string{".aria2", ".!qB"}
tmp files that are created or renamed to by download manager when downloading. E.g. ".aria2", ".!qB".
var PrivateIpRegexp = regexp.MustCompile(`(^127\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}$)|(^10\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}$)|(^172\.1[6-9]{1}[0-9]{0,1}\.[0-9]{1,3}\.[0-9]{1,3}$)|(^172\.2[0-9]{1}[0-9]{0,1}\.[0-9]{1,3}\.[0-9]{1,3}$)|(^172\.3[0-1]{1}[0-9]{0,1}\.[0-9]{1,3}\.[0-9]{1,3}$)|(^192\.168\.[0-9]{1,3}\.[0-9]{1,3}$)`)
Private ip, e.g. 192.168.0.0/16, 127.0.0.0/8, etc. from https://stackoverflow.com/questions/2814002/private-ip-address-identifier-in-regular-expression .
var Utf8bom = []byte{0xEF, 0xBB, 0xBF}
0xEF, 0xBB, 0xBF
Functions ¶
This section is empty.
Types ¶
This section is empty.