python-irodsclient icon indicating copy to clipboard operation
python-irodsclient copied to clipboard

Implement a copy function for collections

Open hechth opened this issue 2 years ago • 8 comments

It would be cool if collections could be copied the same way as it is currently possible for data objects using a single function call to the respective manager.

hechth avatar Nov 30 '23 10:11 hechth

recursive calls are currently client-driven...

implementing server-side recursion might depend on something like... https://github.com/irods/irods/issues/7213

trel avatar Nov 30 '23 13:11 trel

icp handles this via cpUtil.cpp in irods/irods, which is part of irods-dev(el), which is available to the C++ client iCommands.

Currently, other languages have to handle this logic themselves... which is... not what we want for the long term. Hence a server-side solution would be nice/good.

trel avatar Nov 30 '23 13:11 trel

Whether or not it was ever meant to be used, we have had this thing sitting around for quite a long time... https://github.com/irods/irods/blob/aff93a3fbe417c8ec2e9d834b5eb2d6b2ae31083/plugins/experimental/src/copy.cpp#L40

alanking avatar Nov 30 '23 14:11 alanking

but... is that available for use by a call from Python?

trel avatar Nov 30 '23 15:11 trel

It's an API plugin, so... yes?

alanking avatar Nov 30 '23 15:11 alanking

Well, right, that's so smart.

trel avatar Nov 30 '23 15:11 trel

Hmm... an "experimental" plugin. Maybe not.

alanking avatar Nov 30 '23 15:11 alanking

Easily done in pure python too. Even easier if we use pyfilesystem2's fs.walk()

d-w-moore avatar Dec 01 '23 14:12 d-w-moore