How to create directories??
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.
Re: How to create directories??
Try QDir::mkdir() or QDir::mkpath().
Re: How to create directories??
Quote:
Originally Posted by paranoid_android
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().
Quote:
Originally Posted by paranoid_android
If yes what I've to add to the makefile generated with qmake.I tried with something like:
It should be:
Code:
directoryName:
$(MKDIR) directoryName
You also have to add "directoryName" somewhere as a dependency. Like:
Code:
all: ... directoryName ...
...
But remember that qmake will overwrite your Makefile.
Re: How to create directories??
Thank you very much.I'll try with QDir :)