|
|
@ -50,6 +50,10 @@ func (sp FileSystemStorageProvider) GetPath(bucketName string, objectName string |
|
|
|
return filepath.Join(sp.wd, StorageFolderName, sp.basePath, bucketName, objectName) |
|
|
|
} |
|
|
|
|
|
|
|
func (sp FileSystemStorageProvider) OpenFile(bucketName string, objectName string) (*os.File, error) { |
|
|
|
return os.Open(sp.GetPath(bucketName, objectName)) |
|
|
|
} |
|
|
|
|
|
|
|
func GetFileSystemStorageProvider(basePath string, wd string) FileSystemStorageProvider { |
|
|
|
if wd == "" { |
|
|
|
wd, _ = os.Getwd() |
|
|
|