Example #1
0
func GetFile(local_path, listener string, uid, gid int, perms string) error {
	setStorageEngine(listener)
	err := storage.Download(utils.GetRelativeUploadPath(listener, local_path), local_path, uid, gid, perms, listener)
	if err != nil {
		log.Infof("Error downloading file from S3 (%s) : %+v", err.Error(), err)
	}
	return err
}
Example #2
0
func RemoveFile(local_path, listener string) bool {
	setStorageEngine(listener)
	return storage.Remove(utils.GetRelativeUploadPath(listener, local_path))
}
Example #3
0
func PutFile(local_path, listener string) error {
	setStorageEngine(listener)
	return storage.Upload(local_path, utils.GetRelativeUploadPath(listener, local_path))
}