Revision 04a69a18 lib/utils.py
b/lib/utils.py | ||
---|---|---|
1221 | 1221 |
@param path: the directory to enumerate |
1222 | 1222 |
@rtype: list |
1223 | 1223 |
@return: the list of all files not starting with a dot |
1224 |
@raise ProgrammerError: if L{path} is not an absolue and normalized path |
|
1224 | 1225 |
|
1225 | 1226 |
""" |
1227 |
if not IsNormAbsPath(path): |
|
1228 |
raise errors.ProgrammerError("Path passed to ListVisibleFiles is not" |
|
1229 |
" absolute/normalized: '%s'" % path) |
|
1226 | 1230 |
files = [i for i in os.listdir(path) if not i.startswith(".")] |
1227 | 1231 |
files.sort() |
1228 | 1232 |
return files |
Also available in: Unified diff