adding a struct to manage file nodes
This commit is contained in:
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user