-
local file path
Hi All,
In my application I need to write out some file paths for an independent application to read and process. And I want to do it in a cross platform way. Which is to say:
If "home/sk/sk.dat" is the path to sk.dat then I want to write out:
1. On Linux : "home/sk/sk.dat"
2. On win : "home\sk\sk.dat"
Is there any QT Util which can do this automatically ?
Thanks in advance,
sky
-
Re: local file path
-
Re: local file path
Thank You Lesiok. I wonder how I missed it!
-
Re: local file path
the first works for me on Win XP and Ubuntu-Linux also. Even for the non-Qt ifstream/ofstream file handling mode, I tried it for FILE* also, but that failed, but that was just for being curious. But since than I'm not counting disappearing backslashs any more... :) (Well, it might be still not as correct as this nativeSeparator version, but works.)