dircomp/dircomp.h

40 lines
862 B
C
Raw Permalink Normal View History

2023-04-14 10:04:56 +02:00
/*
THE SOFTWARE IS PROVIDED AS IS, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
*/
# ifndef DIRCOMP_GUARD
# define DIRCOMP_GUARD
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <stdbool.h>
#include <dirent.h>
#include <string.h>
#include <limits.h>
2023-04-14 18:20:44 +02:00
#include <sys/types.h>
#include <sys/stat.h>
2023-04-14 10:04:56 +02:00
struct arguments{
char* directory1;
char* directory2;
bool r; // recursive
2023-04-14 18:20:44 +02:00
bool v; // verbose
2023-04-14 10:04:56 +02:00
bool h; // help
2023-04-16 17:02:23 +02:00
bool f; // fast
2023-04-14 10:04:56 +02:00
};
struct arguments get_arguments(int, char**);
// Reference: https://www.gnu.org/software/libc/manual/html_node/Directory-Entries.html
2023-04-14 22:36:09 +02:00
bool analyze_directories(char*, char*, struct arguments*);
2023-04-14 10:04:56 +02:00
int are_files_equal(char*, char*);
2023-04-14 10:04:56 +02:00
void print_help(void);
#endif