I am confused about where files end up when I download them with Downloads.jl. Unfortunately there are no examples in the documentation to follow, so it’s hard to know what I’m doing wrong.
Here’s my attempt at downloading a 1 MB file:
using Downloads
my_file = "https://its-live-data.s3.amazonaws.com/velocity_image_pair/landsatOLI/v01/32607/LT05_L1TP_061018_19951015_20160925_01_T1_X_LT05_L1TP_062018_19950904_20160926_01_T1_G0240V01_P068.nc"
Downloads.download(my_file)
After running the code above, I am expecting to find the downloaded file in my current directory, but it’s not there. When I run the code above, it prints this line:
"/var/folders/3q/36tmwvtx50ldmv31f23wfz7w0000gq/T/jl_fe5urYZmHM"
which might suggest that Downloads
put the file in a folder called /var/folders...
, but I can’t find that directory on my computer.
The Downloads.jl documentation suggests that something like this might place the file in the current directory:
Downloads.download(my_file,output=pwd())
but the line above produces this error:
ERROR: MethodError: no method matching download(::String, ::Nothing; output="/Users/cgreene/Documents/MATLAB/data_testing")
I also found this thread, which suggests the target location might be entered as the second argument to the downloads function like this:
Downloads.download(my_file,pwd())
but the above produces this error:
ERROR: IOError: rm("/Users/cgreene/Documents/MATLAB/data_testing"): directory not empty (ENOTEMPTY)
Does anyone know where files go when they’re downloaded by Downloads.download()
? And is there a way to specify the target location?