Creating sub directories from Torque Script?
by Neil Marshall · in Torque Game Engine · 06/30/2006 (11:01 am) · 3 replies
Is it possible to create a sub directory from Torque Script?
I'm programming a level downloader which operates before the level loads and the files are coming across fine, unless I try to add a file to a sub directory which doesn't exist and then it fails.
I'm programming a level downloader which operates before the level loads and the files are coming across fine, unless I try to add a file to a sub directory which doesn't exist and then it fails.
#2
This isn't a script solution, but it might still help you out.
It came from Jeff White . . .
I hope this helps.
Aaron E.
06/30/2006 (12:42 pm)
Neil,This isn't a script solution, but it might still help you out.
It came from Jeff White . . .
Quote:In game.cc
in void GameInit() add:
Platform::createPath ("screenshots/");
to create the screenshots directory automagically.
I hope this helps.
Aaron E.
#3
06/30/2006 (3:21 pm)
Excellent. If that createPath function works it shouldn't be too hard to expose to scripting or even better, just to build in to the file download code.
Torque Owner Cliff
I have looked over here and I do not see a command to create a directory, though. Sounds like it's time for you to break out the ol' C++ compiler.