What is the recommended way of creating a directory or folder on the device

Hey guys,

I need to create a directory on the device.
I’m trying this command:

string command = string("mkdir ")+ writablePath + string(filename); system(command.c_str());
Getting this error
mkdir: Simulator/5.1/Applications/2A4B81C0-3DE9-4724-9850-5E77270D90AB/Library/Caches: No such file or directory

might need to escape the writablePath
“iPhoneSimulator”

but anyway, what is the recommended way to create a directory, that would work cross platform?

thanks