Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- Force 4.0 Reference - mkdir() create a directory http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
 mkdir()             Create a directory
------------------------------------------------------------------------------
 Declaration
   file.hdr

 Syntax
   func logical mkdir extern
   param const char cDirectory

 Arguments
   cDirectory is the name of the directory to create.

 Return
   A logical indicating the success of operation.

 Description
   This function attempts to make the subdirectory cDirectory and
   returns .t. if the directory is created.

   If a full path is specified for directory_name, all parent directories
   must exist and only the child directory is created by mkdir(). To create a
   "full path", e.g. "\dir1\dir2\dir3", each subdirectory must be made
   separately.

 Example
   #define EXAMPLE_FILE
   #include example.hdr

   proc Test_mkdir
   vardef
      char cDir
   enddef
   cDir := "testing"                // set directory name
   mkdir( cDir )                    // create directory
   if isdir( cDir )                 // if directory created
      ? "Directory created"
      rmdir( cDir )                 // remove directory
   endif
   endproc

   proc main
   Test_mkdir()
   endproc

See Also: chdir() isdir() rmdir()

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