[erlang-questions] is there a generic file fetcher anywhere?

zxq9 zxq9@REDACTED
Tue Nov 18 11:55:18 CET 2014


Maybe the more interesting question up front is whether there is a generic file 
finder? At the very least addressing would be a minor challenge (one GitHib has 
tried to pretend doesn't exist through the use of gigantic URLs), even if 
discovery were trivial.

I vaguely remember something about gopher discovery and retrieval extensions 
that could cope with whatever you wrote them to, and it not being easy to 
manage addressing or discovery. But that was a long time ago.

-Craig

On 2014年11月18日 火曜日 11:43:19 Joe Armstrong wrote:
> On Tue, Nov 18, 2014 at 11:25 AM, Alexei Sholik <alcosholik@REDACTED> 
wrote:
> > Things like HTTP and Git operate on different kinds of entities.
> 
> Precisely - what I want to do is abstract out the differences - I see
> no reason why I should not
> extract a specific file from a git archive given its hash.
> 
> > One does
> > not simply fetch a file from a Git repository, the whole repository has to
> > be cloned (or shallow-cloned).
> 
> Why not? - often I do this (ie clone a repository, extract one file)
> then throw the rest away :-)
> 
> Git is just a key-value blob store whose keys are content hashes - and
> a few fancy commands with
> silly names to hide this from you.
> 
> > Do you have in mind something like "here's my <login> and <password>,
> > please fetch whatever this <url> points to"?
> 
> I was thinking more of things that are publically available
> 
> 
> /Joe
> 
> > On Tue, Nov 18, 2014 at 12:10 PM, Joe Armstrong <erlang@REDACTED> wrote:
> >> Hello,
> >> 
> >> Has anybody written a "generic file fetcher" - I'd like to fetch files
> >> or collections of files from various remote locations (Git, SVG, HTTP,
> >> FTP
> >> etc)
> >> handling proxies etc. on the way
> >> 
> >> Is there any generic code to do this?
> >> 
> >> I took a quick peek at the rebar source code since I know it can fetch
> >> from git
> >> but it just does a os:cmd("git fetch origin  ...")
> >> 
> >> It strikes me that it would be a good idea to isolate code like this into
> >> a
> >> separate library and make it more generic. This would be rather useful
> >> 
> >> Cheers
> >> 
> >> /Joe
> >> _______________________________________________
> >> erlang-questions mailing list
> >> erlang-questions@REDACTED
> >> http://erlang.org/mailman/listinfo/erlang-questions
> 
> _______________________________________________
> erlang-questions mailing list
> erlang-questions@REDACTED
> http://erlang.org/mailman/listinfo/erlang-questions




More information about the erlang-questions mailing list