User directory in MacOS BMax

Miscellaneous Forums/MacOS X Discussion/User directory in MacOS BMax

The terminal command "cd ~" works, but it's more that I'd like to do it this way.


File = WriteStream("~/myappdocs/document")

Well, that doesn't work, as BlitzMax doesn't see "~" as the user directory.


I've now done it on the "ugly" method...

Like this
(pseudo code. Not real code)
MakeBat "GetUserDir.bat","cd ~\npwd > /AppDir/UserDir.txt"
RunBat "GetUserDir"
UserDir = ReadString("/AppDir/UserDir.txt"

As I said peudo code, but you get the picture.
It is the "ugly" method, so if there's an official method, I'd like to know.


($userDir only got me errors)