CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
filesFinder.py
Go to the documentation of this file.
1 __author__="Aurelija"
2 __date__ ="$2010-07-15 12.27.32$"
3 
4 import re
5 from os.path import join
6 from Utilities.ReleaseScripts.cmsCodeRules.pathToRegEx import pathsToRegEx, pathToRegEx
7 
8 def getFilePathsFromWalk(osWalkResult, file, exceptPaths = []):
9 
10  listOfFiles = []
11 
12  file = pathToRegEx(file)
13 
14  for root, dirs, files in osWalkResult:
15  for name in files:
16  excepted = False
17  fullPath = join(root,name)
18  for path in pathsToRegEx(exceptPaths):
19  if re.match(path, fullPath):
20  excepted = True
21  break
22  if not excepted and re.match(file, name):
23  listOfFiles.append(fullPath)
24  return listOfFiles
def getFilePathsFromWalk
Definition: filesFinder.py:8
static std::string join(char **cmd)
Definition: RemoteFile.cc:18
def pathsToRegEx
Definition: pathToRegEx.py:7