after a few rounds with claude, still not done
This commit is contained in:
+18
-17
@@ -1,39 +1,40 @@
|
|||||||
package storage
|
package storage
|
||||||
|
|
||||||
//import ()
|
import (
|
||||||
|
"io"
|
||||||
|
"os"
|
||||||
|
)
|
||||||
|
|
||||||
type LocalStorage {
|
|
||||||
BaseDir string
|
type LocalStorage struct {
|
||||||
|
BaseDir string,
|
||||||
}
|
}
|
||||||
|
|
||||||
func UploadFile(dirPath, filename string, data io.Reader) error {
|
|
||||||
|
func (s *LocalStorage) UploadFile(dirPath string, filename string, data io.Reader) error {
|
||||||
//
|
//
|
||||||
}
|
}
|
||||||
|
|
||||||
func ListFiles(dirPath) {
|
func (s *LocalStorage) ListFiles(dirPath string) ([]FileNode, error) {
|
||||||
//
|
//
|
||||||
}
|
}
|
||||||
|
|
||||||
func ReadFile() {
|
func (s *LocalStorage) ReadFile(filePath string) (*os.File, error) {
|
||||||
//
|
//
|
||||||
}
|
}
|
||||||
|
|
||||||
func WriteFile() {
|
func (s *LocalStorage) WriteFile(dirPath string, filename string, data io.Reader) (int, error) {
|
||||||
|
// this is explicitly for writing text files that aren't being uploaded
|
||||||
|
}
|
||||||
|
|
||||||
|
func (s *LocalStorage) DeleteFile(filePath string) error {
|
||||||
//
|
//
|
||||||
}
|
}
|
||||||
|
|
||||||
func CloseFile() {
|
func (s *LocalStorage) DeleteDirectory(dirPath string) error {
|
||||||
//
|
//
|
||||||
}
|
}
|
||||||
|
|
||||||
func DeleteFile() {
|
func (s *LocalStorage) DeleteDirectoryRecursive(dirPath string) error {
|
||||||
//
|
|
||||||
}
|
|
||||||
|
|
||||||
func DeleteDirectory() {
|
|
||||||
//
|
|
||||||
}
|
|
||||||
|
|
||||||
func DeleteDirectoryRecursive() {
|
|
||||||
//
|
//
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,11 +1,25 @@
|
|||||||
package storage
|
package storage
|
||||||
|
|
||||||
|
|
||||||
|
import (
|
||||||
|
"io"
|
||||||
|
"os"
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
type Storage interface {
|
type Storage interface {
|
||||||
ListFiles()
|
UploadFile(dirPath string, filename string, data io.Reader) error
|
||||||
ReadFile(b []byte) (n int, err error)
|
ListFiles(dirPath string) ([]FileNode, error)
|
||||||
WriteFile(b []byte) (n int, err error)
|
ReadFile(filePath string) (*os.File, error)
|
||||||
CloseFile() error
|
WriteFile(dirPath string, filename string, data io.Reader) (int, error)
|
||||||
DeleteFile()
|
DeleteFile(filePath string) error
|
||||||
DeleteDirectory()
|
DeleteDirectory(dirPath string) error
|
||||||
DeleteDirectoryRecursive()
|
DeleteDirectoryRecursive(dirPath string) error
|
||||||
|
}
|
||||||
|
|
||||||
|
type FileNode struct {
|
||||||
|
BasePath string,
|
||||||
|
FileName string,
|
||||||
|
IsDirectory bool,
|
||||||
|
FileSize uint64,
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user