How do I create a folder in C?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • nestle
    New Member
    • Oct 2009
    • 15

    How do I create a folder in C?

    I know how to create a file, by using F=fopen("name of file with extension","w") ; , where F is a pointer to the file. But how do I create a folder? Do folders have some kind of special format? Please someone tell me if it's possible to create a folder in C, and if yes then how?
  • weaknessforcats
    Recognized Expert Expert
    • Mar 2007
    • 9214

    #2
    Directories have nothing to do with C. A directory is just a file with a special format.

    You use call provided by your OS provider to create a directory. For Windows, it's a call to CreateFile.

    Comment

    Working...