-
Notifications
You must be signed in to change notification settings - Fork 28
Description
We've had this come in as a feature request via support, and it is desirable, but not as "obvious" or "trivial" as it might at first appear.
Without diving into why Transfer itself doesn't support recursive mkdir (or, by extension, why FTP and GridFTP don't), here are my basic thoughts on doing this purely client side:
- In the interactive case with text output, it's near-trivial to implement. "Just recursively call mkdir."
This is the easy case and hardly worth discussing.
- This would be similar to recursive ls.
Proper JSON output format handling requires proxifying the transfer interaction to wrap multiple responses. Recursive ls does this and works fine (we've never had a complaint about it), but it also makes globus ls probably our third most complicated command, after login and activate.
- Unifying recursive
lsand recursivemkdirseems like a good goal.
If it's not too hard, the thing we probably would want to do is treat recursive ls and recursive mkdir as a family of commands which iterate over API calls and return wrapped responses. This will lead to less code and a better overall user experience as command behaviors stay consistent.
- This smells like pagination. Should wrapping of multiple calls and wrapping of paginated calls be unified in some way?
Could this even make its way into the SDK? (Is that something we want? I don't think so. Helping people do recursive ls and watching them blow up their memory space seems really unwise.)