Wednesday, 7 August 2013

Is the remove function guaranteed to delete the file?

Is the remove function guaranteed to delete the file?

The wording of the C99 standard seems a bit ambiguous regarding the
behavior of the remove function.
In section 7.19.4.1 paragraph 2:
The remove function causes the file whose name is the string pointed to by
filename to be no longer accessible by that name. A subsequent attempt to
open that file using that name will fail, unless it is created anew.
Does the C99 standard guarantee that the remove function will delete the
file on the disk, or could an implementation simply ignore the file --
leaving the file on disk, but inaccessible -- for the remainder of the
program?

No comments:

Post a Comment