OS depending Pathseperator() command
Posted: Sun Feb 12, 2012 2:23 pm
Hello everybody,
I would like to have a simple build in function for getting the correct pathseperator for the used OS.
Today you have to use CompilerIf to select the right seperator or build up a macro for that case.
How nice could it be to write following?
instead something like that:
I know there are several workarounds for this, but there allready the most of the usefull commands in the FileSystem Lib
so only this one i miss for multi OS coding
I would like to have a simple build in function for getting the correct pathseperator for the used OS.
Today you have to use CompilerIf to select the right seperator or build up a macro for that case.
How nice could it be to write following?
Code: Select all
PathName.s = Drive + GetPathSeperator() + "MyFile.ext"
Code: Select all
CompilerSelect #PB_Compiler_OS
CompilerCase #PB_OS_AmigaOS
Seperator = "\"
CompilerCase #PB_OS_Linux
Seperator = "/"
CompilerEndSelect
PathName.s = Drive + Seperator + "MyFile.ext"
so only this one i miss for multi OS coding