kuma-archive/internal/service/worker.go
2025-03-13 16:06:35 +09:00

24 lines
434 B
Go

package service
import (
"os"
"path/filepath"
"git.wh64.net/devproje/kuma-archive/config"
)
type WorkerService struct{}
type DirEntry struct {
Name string `json:"name"`
FileSize uint64 `json:"file_size"`
}
func NewWorkerService() *WorkerService {
return &WorkerService{}
}
func (sv *WorkerService) Read(path string) (os.FileInfo, error) {
fullpath := filepath.Join(config.INDEX_DIR, path)
return os.Stat(fullpath)
}