adding a struct to manage file nodes

This commit is contained in:
2026-05-07 19:25:57 -06:00
parent 3db77bc32a
commit 1c312f4358
+11
View File
@@ -15,6 +15,17 @@ func resolveFileStorePath(file_store_path string) {
}
}
type StoredFileNode struct {
Name string `json:"name"` // full file name with extension
Path string `json:"path"` // path to file
Size int64 `json:"size"` // byte size of file
Extension string `json:"extension"` // the file name extension
MimeType string `json:"mime_type"` // mime type regarless of extension
Permissions string `json:"permissions"` // UNIX permissions
IsFolder bool `json:"is_folder"` // directory flag
Modified time.Time `json:"modified_at"` // last modification date
}
func readFilesFromFileStorePath(file_store_path string) {
files, err := os.ReadDir(file_store_path)
if err != nil {