Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- int main(int argc, char const *argv[])
- {
- int fdDest;
- if((fdDest = open("test.jpg",O_WRONLY|O_CREAT|O_TRUNC,S_IRWXU)) == -1){
- perror("fichier de destination impossible à créer");
- exit(-1);
- }
- int fdSrc;
- if((fdSrc = open("ab014.jpg",O_RDONLY)) == -1){
- perror("fichier de destination impossible à créer");
- exit(-1);
- }
- file_to_file(fdSrc,fdDest);
- close(fdDest);
- close(fdSrc);
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement