Git Product home page Git Product logo

Comments (4)

plata avatar plata commented on July 25, 2024 1

Yes, if you install the app again. That's not the normal use case as far as I'm concerned.

For example in verbs it's different: As multiple apps might use the same verbs, it makes sense to keep the resource.

from scripts.

madoar avatar madoar commented on July 25, 2024 1

It is not only about keeping the resource. I see two possible benefits of using Resource over Downloader:

  • Resource could be imagined as a temporary object (i.e. file or directory) that is automatically deleted after exiting the script. This is useful for example when downloading archives or installers that should be deleted afterwards anyway
  • Resource returns the path leading to the downloaded file, this means that you don't need to do any path building on the calling site (e.g. originDirectory + exeName). This reduces the number of possible errors a script developer can do (for example I'm often asking myself the question: Is there a "/" missing between originDirectory and exeName?)

In addition Resource uses Downloader internally so it is essentially the same anyway

from scripts.

plata avatar plata commented on July 25, 2024

The var to const is done. What's the advantage of using Resource? Shouldn't Resource be used only for stuff which is shared between scripts? If you use it to download big files, I think they will remain in the resources directory and fill up your hard drive.

from scripts.

Zemogiter avatar Zemogiter commented on July 25, 2024

At least you won't have to redownload them everytime.

from scripts.

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.