Reputation: 7205
Is there any way to create a directory using SDL? I want something similar to the windows api function SHCreateDirectory().
I have been looking here http://www.libsdl.org/cgi/docwiki.cgi/SDL_API but there is nothing even close to it.
Upvotes: 0
Views: 2173
Reputation: 93410
On Windows, use CreateDirectory()
:
#include <iostream>
#include <windows.h>
#include <string>
using namespace std;
LPSECURITY_ATTRIBUTES attr;
attr = NULL;
string folder_name = "test"
CreateDirectory(folder_name.c_str(), attr);
I haven't tested this code.
Upvotes: 1
Reputation: 1234
SDL doesn't expose an API for filesystem operations. See this post on the same topic
You can use Boost or Qt (use only the core package) for cross platform filesystem operations.
Upvotes: 2