https://github.com/aymanbagabas/fss3
FSS3 is an S3 filesystem abstraction layer for Golang
https://github.com/aymanbagabas/fss3
aws aws-s3 go golang minio minio-client s3
Last synced: 7 months ago
JSON representation
FSS3 is an S3 filesystem abstraction layer for Golang
- Host: GitHub
- URL: https://github.com/aymanbagabas/fss3
- Owner: aymanbagabas
- License: mit
- Created: 2021-08-20T20:40:55.000Z (about 4 years ago)
- Default Branch: master
- Last Pushed: 2025-03-13T00:47:58.000Z (7 months ago)
- Last Synced: 2025-03-13T01:31:31.559Z (7 months ago)
- Topics: aws, aws-s3, go, golang, minio, minio-client, s3
- Language: Go
- Homepage:
- Size: 60.5 KB
- Stars: 55
- Watchers: 2
- Forks: 4
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# FSS3
[](https://github.com/aymanbagabas/fss3/actions/workflows/ci.yml)
[](https://github.com/aymanbagabas/fss3)
[](https://pkg.go.dev/github.com/aymanbagabas/fss3)
[](https://goreportcard.com/report/github.com/aymanbagabas/fss3)
[](https://GitHub.com/aymanbagabas/fss3/releases/)FSS3 is an S3 filesystem abstraction layer for Golang that implements most of [fs](https://pkg.go.dev/io/fs), and [io](https://pkg.go.dev/io) interfaces, and [os](https://pkg.go.dev/os) functions. It is based on [minio-go](https://github.com/minio/minio-go) which makes it compatible with any S3 compliant service.
## Download
```
go get github.com/aymanbagabas/fss3
```## Quick Start
```go
package mainimport "github.com/aymanbagabas/fss3"
func main() {
cfg := fss3.Config{
AccessKeyID: "AWS_ACCESS_KEY_ID",
SecretAccessKey: "AWS_SECRET_ACCESS_KEY",
Endpoint: "ENDPOINT",
UseSSL: true,
BucketName: "MY_BUCKET_NAME",
Region: "REGION",
DirFileName: "_", // special directory file name that stores directory metadata
Umask: 0, // Don't set umask
}
s3, err := fss3.New(cfg)
if err != nil {
panic(err)
}err = s3.Mkdir("Newfolder", 0777)
if err != nil {
panic(err)
}data := []byte{"hello world"}
err = s3.WriteFile("Newfolder/myfile.txt", data, 0644)
if err != nil {
panic(err)
}err = s3.RemoveAll("Newfolder")
if err != nil {
panic(err)
}
}
```## License
This library is distributed under the [MIT License](https://opensource.org/licenses/MIT), see [LICENSE](https://github.com/aymanbagabas/fss3/blob/master/LICENSE) for more information.