Home > Software engineering >  CreateFile can create the directory?
CreateFile can create the directory?

Time:09-22

Want to in the specified directory to create a file, directory may not exist, use this function can be realized at once to create directories and files?

CodePudding user response:

CreateFile
The CreateFile function creates or opens The following objects and returns a handle that can be 2 access The object:

Files
Pipes
Mailslots
Communications resources
Disk devices (Windows NT only)
Consoles
directories (open only)

CodePudding user response:

Create a directory using the CreateDirectory

CodePudding user response:

No, because a lot of program is a directory CreateFile to judge whether there is, if the CreateFile also created the directory, by the way can cause these application error,
Can use SHCreateDirectory one-time create multi-level directory,

CodePudding user response:

CreateDirectory create a directory with this
  • Related