def checkSort_Asc_Folder(folderPath): fileNames = tm_com.getFileNamesFromFolder(folderPath) for fileName in fileNames: filePath = folderPath + fileName fileToSort = tm_SingleFile(filePath) print filePath print checkSort_Asc(fileToSort)
def __init__(self,folderPath): fileNames = tm_com.getFileNamesFromFolder(folderPath) self.dataList = [] for fileName in fileNames: self.dataList.append(tm_DividedFile(folderPath,fileName)) self.size = len(self.dataList) self.name = folderPath
def HeapSortFilesUnderFolder(folderPath): fileNames = tm_com.getFileNamesFromFolder(folderPath) print fileNames for fileName in fileNames: filePath = folderPath + fileName fileToSort = tm_SingleFile(filePath) heapSorter = tm_HeapSorter(fileToSort) heapSorter.maxSort() heapSorter.write()