Main Page
Namespaces
Classes
Package Documentation
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Properties
Friends
Macros
Pages
src
Utilities
ReleaseScripts
python
cmsCodeRules
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
cmsCodeRules.pathToRegEx.pathsToRegEx
def pathsToRegEx
Definition:
pathToRegEx.py:7
join
static std::string join(char **cmd)
Definition:
RemoteFile.cc:18
cmsCodeRules.pathToRegEx.pathToRegEx
def pathToRegEx
Definition:
pathToRegEx.py:14
cmsCodeRules.filesFinder.getFilePathsFromWalk
def getFilePathsFromWalk
Definition:
filesFinder.py:8
Generated for CMSSW Reference Manual by
1.8.5