Discussion Locked
0 helpful
1 reply
Closed to new repliesThis discussion is closed. It stays readable, but it takes no new replies.
If possible, how do I create directories with C++ code? Also, can I then assign security rights to those directories using C++?
1 reply
by emmenjay
You cannot create or manage directories using standard, portable, C++. However most C++ compilers provide platform-specific methods to do this.
On a Unix or Linux system you would create a directory using mkdir() and set access permissions usingchmod() and chown().
If you are using VC++ on Windows, you can use _mkdir() to create a directory (or _wmkdir() to create a directory with a Unicode name) and then _chmod() or _wchmod() to set basic access permissions. However, a more flexible way is to use CreateDirectory() which allows you to specify a security descriptor.
This discussion is closed to new replies.
Trending Web Development posts
Sort by Trending
0 helpful
1 reply
1 helpful
3 replies
Discussion Locked
What Makes a Business Website Effective in 2026
2 helpful
10 replies
Question Unanswered
How can developers improve performance on content-heavy websites?
0 helpful
0 replies
Question Unanswered
How do you protect downloadable files on a WordPress store?
0 helpful
0 replies