download list

This commit is contained in:
josc146
2023-05-20 13:00:08 +08:00
parent 4f8e35ce62
commit 0761df8df5
8 changed files with 104 additions and 12 deletions

View File

@@ -8,8 +8,6 @@ import (
"path/filepath"
"runtime"
"time"
"github.com/cavaliergopher/grab/v3"
)
func (a *App) SaveJson(fileName string, jsonData any) error {
@@ -86,14 +84,6 @@ func (a *App) ListDirFiles(dirPath string) ([]FileInfo, error) {
return filesInfo, nil
}
func (a *App) DownloadFile(path string, url string) error {
_, err := grab.Get(path, url)
if err != nil {
return err
}
return nil
}
func (a *App) DeleteFile(path string) error {
err := os.Remove(path)
if err != nil {