diff options
| author | Abdellah El Morabit <nsrddyn@gmail.com> | 2025-02-22 22:44:14 +0100 |
|---|---|---|
| committer | Abdellah El Morabit <nsrddyn@gmail.com> | 2025-02-22 22:44:14 +0100 |
| commit | 34d7d91bc56f32602430532646f092701a350fe0 (patch) | |
| tree | 8ed25ed0ce133d9eeca018e45e6ebd86272f5466 | |
| parent | d7e5815872cd043f905114bffff608c7792cd417 (diff) | |
still thinking on how to properly implement this
| -rw-r--r-- | main.c | 11 |
1 files changed, 9 insertions, 2 deletions
@@ -179,8 +179,15 @@ void copy_files(const char *arg) { fclose(pold_file); } -void move_files(const char *arg) { - printf("move file"); +void move_files(const struct split_arg argument) { + if (remove(argument.source) != 0) { + perror("failed while trying to move the file"); + } + // Create a file + FILE *pFile = fopen(argument.destination, "w"); + + // Close the file + fclose(pFile); } void clear(const char *arg) { |
