On 19 Aug 2020, at 13:00, Urban, Cristiano <[log in to unmask]> wrote:Hi,I'm trying to perform some tests with the xrootd python bindings. My first question is the following: is there a simple way to perform a recursive copy of a folder from one node to another?Here below is shown a very bad piece of code that does the job.from XRootD import client
from XRootD.client.flags import DirListFlags
from XRootD.client.flags import StatInfoFlags
from XRootD.client.flags import OpenFlags
myclient = client.FileSystem('root://tape_frontend')
myserver = client.FileSystem('root://transfer_node')
status, listing = myclient.dirlist('/home/tape_frontend/data/aaa/', DirListFlags.RECURSIVE, 0)
for entry in listing:
if entry.statinfo.flags == 16:
src = "root://tape_frontend//home/tape_frontend/data/aaa/" + entry.name
dest = "root://transfer_node//home/transfer_node/data/aaa/" + entry.name
process = client.CopyProcess()
process.add_job(source = src, target = dest, mkdir = True, force = True)
p = process.prepare()
r = process.run()
print(r, p)
else:
# it's a dir...
myserver.mkdir(entry.name)
print("Transfer completed.")I used three docker containers: one for launching the python script and the other two as source and destination for the copy process.Please, could you give me some hints?Another question: are these python bindings going to be maintained over time or not?Thank you in advance for your time.Best regards,Cristiano Urban.--______________________________________Cristiano UrbanSkype: cristiano_271187Site/blog: https://crish4cks.net/
Use REPLY-ALL to reply to list
To unsubscribe from the XROOTD-L list, click the following link:
https://listserv.slac.stanford.edu/cgi-bin/wa?SUBED1=XROOTD-L&A=1