ECP-VeloC / AXL

Asynchronous Transfer Library
MIT License
2 stars 8 forks source link

AXL doesn’t work on empty directories... should it? #39

Open gonsie opened 5 years ago

adammoody commented 5 years ago

Are you asking about whether we should allow an app to transfer a directory?

tonyhutter commented 5 years ago

This came up because #42 allows you to specify source and destination directories for AXL_Add() as a convenience. So if you had:

./dir1/file1
./dir1/file2
./dir1/file3
./dir1/dir2/file4

...you could just do AXL_Add(id, "./dir1", dest), rather than doing an AXL_Add() on every file. The issue is that there isn't a way to copy an empty directory in AXL. So if you had...

./dir1/file1
./dir1/file2
./dir1/file3
./dir1/dir2/file4
./dir1/dir3/

dir3/ wouldn't get copied. I think we should add in empty directory copies for completeness. That way we can say that AXL_Add() follows the same semantics as cp -r, which is easy for a user to understand. This should be a super low priority task though, as I doubt there's any users that would need it.