Source file that contains the implementation for the functions that will take care of the SmartFolder creation as well as the link creation.
More...
Source file that contains the implementation for the functions that will take care of the SmartFolder creation as well as the link creation.
- Authors
- Maxime Lovino, Thomas Ibanez
- Date
- January 25, 2017
- Version
- 1.0
int makeFolder |
( |
char * |
path, |
|
|
List * |
files |
|
) |
| |
Function that creates the SmartFolder and links for all files in the list
- Parameters
-
path | The path of the SmartFolder |
files | A list of files to link |
- Returns
- -1 on error, 1 if exists already, 0 otherwise
int makeLink |
( |
char * |
pathToLink, |
|
|
char * |
destFolder |
|
) |
| |
Function that creates a link for the file and puts the link in the destination folder
- Parameters
-
pathToLink | The path we want to link to |
destFolder | The destination folder for the link |
- Returns
- 1 on succes, 0 otherwise
void nextSuffix |
( |
char * |
name | ) |
|
Function to add the next suffix to a name (if no suffix, it will add (1), otherwise it will just increment the count)
- Parameters
-
name | The current name of the file |
int removeFolder |
( |
char * |
path | ) |
|
Function that deletes a folder and all its content
- Parameters
-
path | The path of the folder to delete |
- Returns
- 1 on success, 0 otherwise
int removeLink |
( |
char * |
pathOfFile, |
|
|
char * |
linkFolder |
|
) |
| |
Function to remove a link
- Parameters
-
pathOfFile | The path of the file linked by the link we want to remove |
linkFolder | The folder where the links are stored |
- Returns
- 1 on success, 0 otherwise