File Utilities
- int remove(char *filename); removes the named file.
- int rename(char *from, char *to); renames the file named
from to the file named to.
- We've already seen int fflush(FILE *), which flushes
(clears the i/o buffer) on the passed file.
- int rmdir(const char *dirname); removes the named directory.
- All of the above routines return 0 on sucess, and non-0 on error.
They all set errno to specify what error occurred.
Next Slide