Giter Site home page Giter Site logo

Comments (10)

seankross avatar seankross commented on May 25, 2024

Oh wow this is cool! Interesting that for many of the functions the main argument is path which is a URI. I wonder if that's am abstraction we should be using?

from sixtyfour.

sckott avatar sckott commented on May 25, 2024

I wonder if that's an abstraction we should be using?

maybe? It can be verbose if there's lots of nesting in folders within a single path. I imagine URIs as a principle may not be familiar to users of this pkg? Maybe I'm wrong though

I do like the s3_path idea where users could construct paths rather than having to make each one, e.g.,

s3_path("foo", "bar", letters[1:3], ext = "txt")
#> [1] "s3://foo/bar/a.txt" "s3://foo/bar/b.txt" "s3://foo/bar/c.txt"

from sixtyfour.

sckott avatar sckott commented on May 25, 2024

I just noticed that the abstraction of using URIs may be a good idea to borrow here for at least the reason that it makes it easy then to differentiate between local files and those on s3, e.g.,

# copy local to s3 remote
s3_file_copy("LICENSE", new_path = "s3://s64-test-2/license.txt")
[1] "s3://s64-test-2/license.txt"

# copy s3 remote to local 
s3_file_copy("s3://s64-test-2/license.txt", "stuff.txt")
[1] "stuff.txt"

that is, if a file string doesn't have a s3:// in front of it, then it's i think assumed to be local.

from sixtyfour.

sckott avatar sckott commented on May 25, 2024

Ran into an issue with s3fs::s3_dir_exists - it isn't working to detect a dir that exists, or that doesn't exist correctly. That definitely gives me pause about using the package. Will keep exploring though

from sixtyfour.

seankross avatar seankross commented on May 25, 2024

This might be overkill but I wonder if we should have function called something like s3_path() that would act like fs::path() that would help folks construct paths correctly, by appending s3://, by indicating the file is on S3, etc. Stinks to hear that s3fs might have some idiosyncrasies :(

from sixtyfour.

sckott avatar sckott commented on May 25, 2024

there is! see above

from sixtyfour.

seankross avatar seankross commented on May 25, 2024

Ha wow need to work on my reading skills.

from sixtyfour.

sckott avatar sckott commented on May 25, 2024

we could probably just re-export it in this pkg, kinda like alot of the tidyverse pkgs do

from sixtyfour.

seankross avatar seankross commented on May 25, 2024

I think that would be cool to do, so that end users have one interface.

from sixtyfour.

sckott avatar sckott commented on May 25, 2024

using it now, closing

from sixtyfour.

Related Issues (20)

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.