Thread: Linux equivalent to CreateDirectory

  1. #1
    Registered User
    Join Date
    Jul 2004
    Posts
    9

    Linux equivalent to CreateDirectory

    I was trying to use fopen with wb to create a file and also create the path to that file if the path doesn't exist. It didn't work (under windows) so I made a function that calls CreateDirectory to create the path first, and then fopen the file.

    What is the Linux equivalent to CreateDirectory?

  2. #2
    Obsessed with C chrismiceli's Avatar
    Join Date
    Jan 2003
    Posts
    501
    mkdir(), just like the linux command
    http://www.rt.com/man/mkdir.2.html
    Help populate a c/c++ help irc channel
    server: irc://irc.efnet.net
    channel: #c

  3. #3
    End Of Line Hammer's Avatar
    Join Date
    Apr 2002
    Posts
    6,231
    FAQ
    When all else fails, read the instructions.
    If you're posting code, use code tags: [code] /* insert code here */ [/code]

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Equivalent to volume serial number in linux
    By Elkvis in forum Linux Programming
    Replies: 8
    Last Post: 06-30-2009, 08:46 PM
  2. ReadProcessMemory/WriteProcessMemory Linux equivalent?
    By MrLucky in forum C++ Programming
    Replies: 7
    Last Post: 07-27-2007, 09:36 AM
  3. Linux equivalent to Win32 ShellExecute
    By BobS0327 in forum Linux Programming
    Replies: 4
    Last Post: 06-07-2006, 04:35 AM
  4. Linux equivalent of con
    By dwks in forum Linux Programming
    Replies: 3
    Last Post: 11-12-2005, 11:58 AM
  5. .bat equivalent for linux
    By ichijoji in forum Linux Programming
    Replies: 8
    Last Post: 03-07-2004, 08:06 AM