helgee / RemoteFiles.jl

Download files from the Internet and keep them up-to-date.
Other
49 stars 8 forks source link

Implement load #3

Closed femtotrader closed 5 years ago

femtotrader commented 6 years ago

Hello,

Following https://github.com/davidanthoff/Queryverse.jl/issues/6#issuecomment-406312750 load function (calling FileIO.load) should be implemented

import FileIO: load

"""
    load(rf::RemoteFile)

Loads the contents of a remote file, downloading file if
it haven't been done previously, reading file from disk
and trying to infer the format from filename and/or magic 
bytes in the file.
"""
function load(rf::RemoteFile)
    if !isfile(rf)
        download(rf)
    end
    load(path(rf))
end

Kind regards

helgee commented 6 years ago

Makes sense 👍 Will do...

helgee commented 5 years ago

Well, that took a while. Sorry 😬

femtotrader commented 5 years ago

Thanks @helgee Could you publish a new release with this feature?

helgee commented 5 years ago

Under way: https://github.com/JuliaRegistries/General/pull/2346