dat
dat copied to clipboard
single file download
Having single file download would be cool. A couple options:
-
dat download <key>/file.txt
,dat <key>/file.txt
- download file with in memory metadata -
dat clone <key>/file.txt
- download file with sparse state
The first would be easier and can be implemented now. Second requires some sparse state tracker. This is because if you have a .dat
folder and run dat sync
it will try to download the whole dat by default, even if you only cloned a single file. We need some way to track:
- If a dat was initialized in sparse mode
- What files have been requested for download
This should probably happen in dat-node, since Desktop would have the same issue of sparse downloads ending up with the whole dat.
sparse ness on the commandline seems like it might benefit from some sort of 'include' config (file?) that says which files should be included in the sync
Or maybe just use the .datignore
for that :P
sparse ness on the commandline seems like it might benefit from some sort of 'include' config (file?) that says which files should be included in the sync
Ya, something like that would be necessary.
Or maybe just use the .datignore for that :P
This would be deleted and/or changed by hyperdrive if the source dat had a .datignore
file in it.
.datdownload
cause it's the opposite of .datignore
and we'd add that file to the default ignore list
just noting that this should work with folders and not just files as well :)
And adding that this should work also on subdirectories. So:
dat download dat://key/directory/subdirectory
Tools like dat ls
/ dat download
would def make it easier to work with large dat repositories.
I have a medium-size dat repository (dat://dcpos.ch
, ~10GB). Parts of it aren't loading correctly in Beaker. To narrow down whether this is a Beaker or Dat issue, I tried downloading those files via command-line dat... and found there's no way short of dat clone
-ing the whole thing.
http:// has wget
and curl
, IMO dat:// needs an equivalent.
@dcposch meanwhile, there's https://github.com/millette/dat-shell/ to help you navigate a dat (cd, ls, cat) without downloading the whole thing.
Neither dat ls
or dat download
should be terribly hard to implement.