4

In C++ on Linux I see that on the man page for remove() it states in part:

remove deletes a name from the filesystem. It calls unlink for files, and rmdir for directories.

So I'm wondering if there is any difference between calling remove() versus unlink() on a file? Perhaps the only difference is that unlink() is slightly faster in that it does not have to handle directories?

Charles
  • 50,943
  • 13
  • 104
  • 142
WilliamKF
  • 41,123
  • 68
  • 193
  • 295

0 Answers0