def getFilesFromEOS(path): '''Give path in form /store/relval/CMSSW_9_4_0_pre2/...''' dirs = eostools.listFiles('/eos/cms' + path) files = [] for sub_path in dirs: files += [ 'root://eoscms.cern.ch/' + x for x in eostools.listFiles(sub_path) if re.match('.*root', x) ] return files
def getFilesFromEOS(path, cmseospath=True): '''Give path in form /store/relval/CMSSW_9_4_0_pre2/...''' if path[-1] == "/": path = path[:-1] dirs = eostools.listFiles(cmseospath * '/eos/cms' + path) print "getFilesFromEOS::path:", path print "getFilesFromEOS::dirs: ", dirs files = [] for sub_path in dirs: print "\tsub_path:", sub_path files += [cmseospath * 'root://eoscms.cern.ch/' + x for x in eostools.listFiles(sub_path) if re.match('.*root', x)] print "files:", files return files
def listFiles(self,dir): """Recursively list a file or directory on castor""" return castortools.listFiles(dir,self.options.resursive)
def listFiles(self, dir): """Recursively list a file or directory on castor""" return castortools.listFiles(dir, self.options.resursive)