SmartFolder  1.0
SmartFolder is a way to search files on your system and group the results. The program will interpret search queries and create a folder with symbolic links to all the found matches.
Search.c File Reference

Source file that contains the implementation of our Search (crawler) More...

#include "Search.h"
Include dependency graph for Search.c:

Functions

ListsearchDirectory (const char *rootDir, searchType type, const void *searchArg)
 
int timeCompare (struct timespec *candidate, struct timespec *searchTime)
 

Detailed Description

Source file that contains the implementation of our Search (crawler)

Authors
Maxime Lovino, Thomas Ibanez
Date
January 25, 2017
Version
1.0

Function Documentation

List* searchDirectory ( const char *  rootDir,
searchType  type,
const void *  searchArg 
)

Searches recursively through directories beneath a certain directory

Parameters
rootDirThe directory to start from
typeThe type of search to perform
searchArgThe argument for the search
Returns
A list of matching files
int timeCompare ( struct timespec *  candidate,
struct timespec *  searchTime 
)

Function to compare 2 timespecs

Parameters
candidateThe candidate timespec
searchTimeThe one we're comparing it to
Returns
0 if the date is the same, -1 if the date of the candidate is earlier than the search, 1 otherwise