[erlang-questions] is there a generic file fetcher anywhere?
Tue Nov 18 11:43:19 CET 2014
On Tue, Nov 18, 2014 at 11:25 AM, Alexei Sholik <> 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
> On Tue, Nov 18, 2014 at 12:10 PM, Joe Armstrong <> wrote:
>> 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
>> 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
>> separate library and make it more generic. This would be rather useful
>> erlang-questions mailing list
More information about the erlang-questions