diff options
| author | Maciej Borowiec <81316152+Mosder@users.noreply.github.com> | 2026-07-23 20:17:15 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2026-07-23 20:17:15 +0200 |
| commit | 3419cad016b3c34d0630456d4390c70063462d91 (patch) | |
| tree | 3a1aa4416e45f134d38f83d4ea2285f1972f9391 /analyzer/utils/fs.c | |
| parent | 2e3f7fe39791cd671a68330f7ba7a5bb5fc6f9ae (diff) | |
| parent | 682f9fc8288fdd01de1d88af87495d9e43f56b06 (diff) | |
LGTM
Diffstat (limited to 'analyzer/utils/fs.c')
| -rw-r--r-- | analyzer/utils/fs.c | 13 |
1 files changed, 4 insertions, 9 deletions
diff --git a/analyzer/utils/fs.c b/analyzer/utils/fs.c index 76fb581..5e3eb1c 100644 --- a/analyzer/utils/fs.c +++ b/analyzer/utils/fs.c @@ -1,8 +1,9 @@ -#include "utils.h" +#include "utils/fs.h" -#include <fcntl.h> +#include <stdio.h> +#include <stdlib.h> +#include <string.h> #include <sys/stat.h> -#include <unistd.h> void get_home_dir(char *home_dir) { strcpy(home_dir, getenv("HOME")); @@ -35,9 +36,3 @@ void create_necessary_directories() { mkdir(capture_dir, 0755); mkdir(saves_dir, 0755); } - -void write_file(char *path, void *contents, int contents_len, int flags, mode_t permissions) { - int fd = open(path, flags, permissions); - write(fd, contents, contents_len); - close(fd); -} |
