personal-website/webfilesystem/public.go

16 lines
309 B
Go
Raw Permalink Normal View History

2023-05-07 01:00:22 +00:00
package webfilesystem
func (fs *WebFileSystem) Read(filePath string, fileData interface{}) (*FileHeader, error) {
fileId, err := fs.FindFile(filePath)
if err != nil {
return nil, err
}
fileHeader, err := fs.readFSDocs(fileId, fileData)
if err != nil {
return nil, err
}
return fileHeader, nil
}