PDA

View Full Version : How to create directories??



paranoid_android
9th March 2006, 16:15
Hi.

My application needs some subfolders to put logfiles ecc...

Is there a way to create the folders by some functions in the code or I have to create them by mean of the MakeFile?If yes what I've to add to the makefile generated with qmake.I tried with something like:

createDir: $(CHK_DIR_EXISTS) directoryName
$(MKDIR) directoryName

but it doesn't work.I supposed it's totally wrong so anyone could help me?Thanks a lot.

wysota
9th March 2006, 16:20
Try QDir::mkdir() or QDir::mkpath().

jacek
9th March 2006, 16:23
Is there a way to create the folders by some functions in the code or I have to create them by mean of the MakeFile?
Use QDir::mkdir() or QDir::mkpath().


If yes what I've to add to the makefile generated with qmake.I tried with something like:
It should be:
directoryName:
$(MKDIR) directoryNameYou also have to add "directoryName" somewhere as a dependency. Like:
all: ... directoryName ...
...
But remember that qmake will overwrite your Makefile.

paranoid_android
9th March 2006, 16:28
Thank you very much.I'll try with QDir :)