rmdir()

Removes a directory.

  #include <extras/sys/stat.h> 
  int rmdir(const char *path);   
Parameter

path

The path name, including the directory name to be removed.

Remarks

This function removes a folder specified by path.

If successful, this function returns zero. If it encounters an error, this function returns -1 and set errno.

This facility may not be available on some configurations of the EWL.

Listing: Example for rmdir() Usage

#include <stdio.h> 
#include <extras/sys/stat.h> 
int main(void) 
{ 
if (rmdir("Asok", 0) == 0) 
printf("Directory 'Asok' was removed."); 
return 0; 
}