Question: Write a C function fcopy for a UNIX system that implements the following specification: fcopy(char *srefname char *destfname) if srefname is a regular file,

Write a C function fcopy for a UNIX system that implements the following specification: fcopy(char *srefname

Write a C function fcopy for a UNIX system that implements the following specification: fcopy(char *srefname char *destfname) if srefname is a regular file, fcopy, copies the contents of srcfname to destfname (creating destfname if needed). Use only C System functions. Write a C function dcopy for a UNIX system that implements the following specification: dcopy(char *srcdir, char *destdir) if srcdir is a directory, dcopy copies all regular unhidden files from srcdir to destdir (creating destdir if needed). If destdir exists, any copied file is replaced by the new version. You may use your fcopy and C System functions.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock

Here are the C functions fcopy and dcopy that implement the specified specifications for copying fil... View full answer

blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Operating System Questions!