def linearWalk(rootPath, currentDirFilter=None):
        """
        Returns a list of LinearWalkItem's, one for each file in the tree whose root is "rootPath".

        The parameter "currentDirFilter" is a method applied
        to every tuple (dirPath, dirNames, fileNames) automatically processed by os.walk():

        --it can modify its "dirNames" parameter, so as to prevent
          them to be processed later (just as in os.walk())

        --it can modify its "fileNames" parameter, so as to alter the
          global result linearWalk() (because it only returns files)

        --if it returns True, the files in "fileNames" will be added to the global result
          of linearWalk(); otherwise, they won't be added

        If no filter is passed, all the files are automatically added to the result.
        """
        for dirTuple in os.walk(rootPath):
            (dirPath, dirNames, fileNames) = dirTuple

            if currentDirFilter is not None and not currentDirFilter(dirPath, dirNames, fileNames):
                continue

            for fileName in fileNames:
                yield LinearWalkItem(
                    dirPath,
                    fileName
                )
Returns a list of LinearWalkItem's, one for each file in the tree whose root is "rootPath".

        The parameter "currentDirFilter" is a method applied
        to every tuple (dirPath, dirNames, fileNames) automatically processed by os.walk():

        --it can modify its "dirNames" parameter, so as to prevent
          them to be processed later (just as in os.walk())

        --it can modify its "fileNames" parameter, so as to alter the
          global result linearWalk() (because it only returns files)

        --if it returns True, the files in "fileNames" will be added to the global result
          of linearWalk(); otherwise, they won't be added

        If no filter is passed, all the files are automatically added to the result.