accessing directorys/files

BlitzMax Forums/BlitzMax Programming/accessing directorys/files

EOF(Posted 2004) [#1]
with cross-platforming in mind does it matter which character is used for file and folder access?
that is, forward or backslash.

how do linux/mac handle folders and files?
does blitzmax take care of this internally?

for example:
ChangeDir "mygamedata\gfx"
ChangeDir "mygamedata/gfx"



FlameDuck(Posted 2004) [#2]
how do linux/mac handle folders and files?
Forward slashes, the filesystems "root" directory being "/".

does blitzmax take care of this internally?
I don't know, but if you use proper forward slashes religiously, it'll run on everything.


EOF(Posted 2004) [#3]
what about the final '/' ?
Print CurrentDir$()

On BlitzMax Win32 I get:

c:/blitzmax/temp

Under BlitzPus and Blit3D:

c:\blitz\temp\

Do we need to append the foward slash for all versions of BlitzMax like so:
soundfolder$=CurrentDir$()+"/"+"sfx"
?


Warren(Posted 2004) [#4]
If it doesn't provide the final '/', then yes, I would say you need to add it.


EOF(Posted 2004) [#5]
What I should have asked is,
"Do the Win32 (under Win98/XP/NT), Linux, and Mac versions give the same results for CurrentDir$()?"