Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- Zortech C++ 3.0r4 - <b>rmdir</b> http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
rmdir

Usage

   #include <direct.h>
   int rmdir(char *pathname);

Description

   rmdir deletes the directory specified by the pathname argument. The
   directory must be empty and cannot be the root directory or the current
   working directory. All the intermediate directories must also exist.

Example 

   #include <stdio.h>
   #include <direct.h>
   #include <stdlib.h>

   int main()
   {
       int result;
       result = rmdir("\temp");
       if(result == 0)
           printf("Directory \temp removed\n");
       else {
           printf("Could not remove directory \temp\n");
           return EXIT_FAILURE;
       }

       return EXIT_SUCCESS;
   }

Return Value

   The function rmdir returns a 0 if the directory was deleted. A return
   value of -1 indicates an error and errno is set.

See Also

   mkdir, chdir



See Also: mkdir chdir

Online resources provided by: http://www.X-Hacker.org --- NG 2 HTML conversion by Dave Pearson