Giter VIP home page Giter VIP logo

s3fs's People

Contributors

holzehan avatar jszwec avatar srerickson avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

s3fs's Issues

stat fails for existing directory

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

Unsafe functional options

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.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.