@@ -341,10 +341,14 @@ def getFilesFromDirectory(self, directory, days=0, wildcard="*"):
341
341
# These are the data transfer methods
342
342
#
343
343
344
- def getFile (self , lfn , destinationDir = "" , sourceSE = None ):
345
- """Get a local copy of a LFN from Storage Elements.
346
-
347
- 'lfn' is the logical file name for the desired file
344
+ def getFile (self , lfn , destinationDir = "" , sourceSE = None , diskOnly = False ):
345
+ """Get local copy of LFN(s) from Storage Elements.
346
+
347
+ :param mixed lfn: a single LFN or list of LFNs.
348
+ :param str destinationDir: directory to which the file(s) will be downnloaded. (Default: current working directory).
349
+ :param str sourceSE: source SE from which to download (Default: all replicas will be attempted).
350
+ :param bool diskOnly: chooses the disk ONLY replica(s). (Default: False)
351
+ :return: S_OK({"Successful": {}, "Failed": {}})/S_ERROR(errMessage).
348
352
"""
349
353
log = self .log .getSubLogger ("getFile" )
350
354
fileMetadata = {}
@@ -357,7 +361,7 @@ def getFile(self, lfn, destinationDir="", sourceSE=None):
357
361
log .debug (errStr )
358
362
return S_ERROR (errStr )
359
363
log .debug ("Attempting to get %s files." % len (lfns ))
360
- res = self .getActiveReplicas (lfns , getUrl = False )
364
+ res = self .getActiveReplicas (lfns , getUrl = False , diskOnly = diskOnly )
361
365
if not res ["OK" ]:
362
366
return res
363
367
failed = res ["Value" ]["Failed" ]
0 commit comments