summaryrefslogtreecommitdiff
path: root/main.c
diff options
context:
space:
mode:
authorAbdellah El Morabit <nsrddyn@gmail.com>2025-02-22 22:44:14 +0100
committerAbdellah El Morabit <nsrddyn@gmail.com>2025-02-22 22:44:14 +0100
commit34d7d91bc56f32602430532646f092701a350fe0 (patch)
tree8ed25ed0ce133d9eeca018e45e6ebd86272f5466 /main.c
parentd7e5815872cd043f905114bffff608c7792cd417 (diff)
still thinking on how to properly implement this
Diffstat (limited to 'main.c')
-rw-r--r--main.c11
1 files changed, 9 insertions, 2 deletions
diff --git a/main.c b/main.c
index b6d8828..d6f6dfd 100644
--- a/main.c
+++ b/main.c
@@ -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) {