Files
drogobox-server/internal/storage/storage.go
T

24 lines
546 B
Go

package storage
import (
"io"
"os"
)
type Storage interface {
UploadFile(dirPath string, filename string, data io.Reader) error
ListFiles(dirPath string) ([]FileNode, error)
ReadFile(filePath string) (*os.File, error)
WriteFile(dirPath string, filename string, data io.Reader) (int, error)
DeleteFile(filePath string) error
DeleteDirectory(dirPath string) error
DeleteDirectoryRecursive(dirPath string) error
}
type FileNode struct {
RelativeBasePath string
FileName string
IsDirectory bool
FileSize uint64
}