github.com/qjfoidnh/BaiduPCS-Go@v0.0.0-20231011165705-caa18a3765f3/internal/pcsfunctions/pcscaptcha/pcscaptcha.go (about) 1 // Package pcscaptcha 验证码处理包 2 // TODO: 直接打开验证码 3 package pcscaptcha 4 5 import ( 6 "github.com/qjfoidnh/BaiduPCS-Go/internal/pcsconfig" 7 "os" 8 "path/filepath" 9 ) 10 11 const ( 12 // CaptchaName 验证码文件名称 13 CaptchaName = "captcha.png" 14 ) 15 16 // RemoveOldCaptchaPath 移除旧的验证码路径 17 func RemoveOldCaptchaPath() error { 18 return os.Remove(filepath.Join(pcsconfig.GetConfigDir(), CaptchaName)) 19 } 20 21 // RemoveCaptchaPath 移除验证码路径 22 func RemoveCaptchaPath() error { 23 return os.Remove(CaptchaPath()) 24 }