remove

Syntax

int remove(const char *pathname)

Arguments

pathname
The path to the filesystem entry to delete.

Return

0 if successful, otherwise -1.

Description

Deletes a file or directory from the filesystem by specifying the path to that entry through the pathname argument.
If successful, 0 is returned, otherwise -1 is returned and an error is set.

Comments

Everyone can add his comments about his experiences with this function here. Tips for using it are welcome, too.