09-15-04 03:36 PM
2004-09-15, 00:35(-07), Erik Max Francis:
[...]
>
> unlink deletes files, rmdir deletes directories, remove deletes either.
[...]
And to do so, remove does a "lstat" on the file to find out if
it's a directory or not. That means that "remove" involves two
system calls (lstat and either unlink or rmdir). You can save
the "lstat" if you know the type of the file by advance by
calling directly unlink or rmdir.
--
Stephane
[ Post a follow-up to this message ]
|