def FilterFiles(file_list): """Filters a list of paths and returns a list of paths that can probably be opened in the editor. @param file_list: list of files/folders to filter for good files in """ good = list() checker = ebmlib.FileTypeChecker() for path in file_list: if not checker.IsBinary(path): good.append(path) return good
def setUp(self): self.fpath = common.GetDataFilePath(u'test_read_utf8.txt') self.bpath = common.GetDataFilePath(u'image_test.png') self.checker = ebmlib.FileTypeChecker()