-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathfclean.c
35 lines (34 loc) · 975 Bytes
/
fclean.c
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
#include<stdio.h>
#include<unistd.h>
#include<fcntl.h>
void main()
{
if(access("../Input/1G.img",F_OK)==0)
{
printf("Input/1G.img is found!\n");
if(remove("../Input/1G.img")==0)
printf("Delete Input/1G.img!\n");
else
printf("Delete Input/1G.img failed!\n");
}
else
printf("Input/1G.img is never found!\n");
if(rmdir("../Input")==0)
printf("Delete Input folder!\n");
else
printf("Delete Input folder failed!\n");
if(access("../Output/1G.img",F_OK)==0)
{
printf("Output/1G.img is found!\n");
if(remove("../Output/1G.img")==0)
printf("Delete Output/1G.img!\n");
else
printf("Delete Output/1G.img failed!\n");
}
else
printf("Output/1G.img is never found!\n");
if(rmdir("../Output")==0)
printf("Delete Output folder!\n");
else
printf("Delete Output folder failed!\n");
}