Unix to Windows Porting Dictionary for HPC

RSS

Links

Function List

rmdir


Unix

header file: unistd.h

int rmdir(const char *dirname);

Windows

header file: direct.h

int _rmdir(const char *dirname);

Purpose

This function removes the directory specified by dirname.

Discussion

The Windows and Unix versions of this function differ only in name and the needed header file.

Example of Use in Windows


#include <direct.h>

int main(void)
{
   if( _rmdir( "\\testtmp" ) == 0 ) {
      printf("Directory '\\testtmp' was successfully removed\n");
   }
   else
      printf("Problem removing directory '\\testtmp'\n");
}
    
blog comments powered by Disqus
Valid HTML 4.01 Transitional Valid CSS!