Solved which function can replace _tmkdir that known only in windows
-
Hi
I am working on an embedded software that we have on windows and we move it to cross platform on Debian with Qt
in the windows code is appear _tmkdir and i found that is a windows function, and I can not found function to replace it
please let me know what I can do.
Thanks -
@Bracha
I have already answered twice. You can use either one, nothing more to say. If you want to get away from Windows/MSVC dependency, you should not be using the ones in the documentation you are consulting. -
-
@Bracha
_tmkdir()
sounds like some kind ofmkdir()
, maybe with a wide-character parameter.There is a C runtime function
mkdir()
which is not Windows-specific. Or in Qt you have bool QDir::mkdir(const QString &dirName) const for this. -
@jsulm u mean mkpath?
from what i understand tmkdir are not normal mkdir and i try to figure out what the different -
Hi,
From what I gathered, tmkdir is a wrapper around the CreateDirectory which requires the parent folders to exist. mkpath creates all the intermediate folders if they don't exists.
-
@JonB yes you are right, how can i adjust to tmkdir, i dont want to lose information
i have this line:
_tmkdir(L"\Nand Flash\failure");
and i'm not sure why they choose to use tmkdir -
@SGaist thank you
so from your side u think that tmkdir can replaced by mkpath? -
@Bracha
Why would you want to replace existing_tmkdir
, which is working/intended, with amkpath
, which behaves differently?I suggested to you earlier:
There is a C runtime function
mkdir()
which is not Windows-specific. Or in Qt you have boolQDir::mkdir(const QString &dirName) const
for this.Why not use one of these?
-
@JonB
Actually they are not considered, _tmkdir and mkdir.
But I think in such a case its unnecessary, because the string will be a path and I guess there is no need for wide characters from Tchar.h
(as you can see here:).What are you think?
-
@Bracha
I have already answered twice. You can use either one, nothing more to say. If you want to get away from Windows/MSVC dependency, you should not be using the ones in the documentation you are consulting.