Create an Alias with Blitzmax

BlitzMax Forums/BlitzMax Programming/Create an Alias with Blitzmax

MacSven(Posted 2011) [#1]
Has anyone an idea how i can create an Alias of an folder with blitzmax, can Blitzmax differ between an real folder and an alias? (LoadDir etc) under MacOS X


Perturbatio(Posted 2011) [#2]
since OSX is essentially unix under the hood, I presume you can use the "ln" command in conjunction with system

Last edited 2011


ima747(Posted 2011) [#3]
Aliases in OS X are NOT symlinks. That is to say Aliases are like they used to be in OS 9 and under (and like windows), they are a file that the finder reads and resolves. That said, symlinks DO work in OS X, and they actually work better than proper aliases because they are NOT files they are navigable via the command line (since aliases are files, you can't "cd" into them...). Anything that uses the OS toolkits to access directories *should* (unless they work on a UNIX level instead of a mac level) be able to resolve aliases naturally (such as open/save file dialogs, etc.). However if something is using a sneaky method and approaching it from the UNIX end of the OS (such as through "system" calls) expect to run into problems.

I don't know how to create an alias (it's probably deep in the toolkit somewhere and I seriously doubt bmax has any inbuilt support, though there *might* be a module that could do it...). Personally I would go with the ln via system approach to save time and sanity of trying to get something else working.


MacSven(Posted 2011) [#4]
Thanx for the answer, i will try it this weekend!
in the manual ln i have found what i need.


Brucey(Posted 2011) [#5]
Personally, I'd use an API call...

(no surprise there then!)


ima747(Posted 2011) [#6]
I'd use an API call wrapped up by Brucy too if I had one :0)