jszwec / s3fs Goto Github PK
View Code? Open in Web Editor NEWS3 FileSystem (fs.FS) implementation
License: MIT License
S3 FileSystem (fs.FS) implementation
License: MIT License
I believe I've identified a bug that causes Stat()
to fail in certain circumstances. Given two objects, a/b.txt
and a.txt
, a call to fs.Stat(fsys, "a")
will fail: open a: file does not exist
. I believe this is because the MaxKeys
budget (of 1) in the call to ListObjects
is used-up by a.txt
in the response Contents
(link).
I'll submit a failing test in a PR
Any plan to upgrade to v2? v1 has some vulnerabilities.
I noticed you use functional options (which is great), but way they are currently implemented is not perfectly concurrent safe.
Here is the option type:
// Option is a function that provides optional features to S3FS.
type Option func(*S3FS)
The problem with this signature is that you can use options after initialization to modify the state of S3FS
:
WithReadSeeker(New(...))
You can avoid that by introducing a private option struct:
// Option is a function that provides optional features to S3FS.
type Option func(*s3FSoptions)
An even better solution is making the Option type an interface:
// Option is a function that provides optional features to S3FS.
type Option interface{
apply(*S3FS)
}
Using any of the above methods callers won't be able to modify internal state after initialization.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.