I'm working on a college project in C++ that involves implementing a Folder Cleaner using Data Structures and Algorithms (DSA). The requirements for the project are as follows:
Project Description:
Folder Cleaner: The task is to build a Folder Cleaner program. It should scan a given directory and identify files that meet one or more of the following criteria:
- Old and redundant files: A newer copy of the file is present in the directory.
- Files that have been old for more than N number of months.
- Empty files (i.e., files with no content).
- Files that have not been accessed for at least M number of times.
I have a basic understanding of C++ and have covered some DSA concepts like arrays, linked lists, and basic searching and sorting algorithms. However, I'm not sure how to approach this project efficiently using DSA.
Can someone guide me on how to proceed with this project? Any suggestions regarding the choice of data structures and algorithms to efficiently implement this Folder Cleaner program would be greatly appreciated.
Additionally, any insights into handling file operations in C++ would be helpful. I'm particularly interested in efficient ways to traverse directories, read file attributes (such as creation date, last access time), and perform file comparisons.
Источник: https://stackoverflow.com/questions/780 ... algorithms