PocketMatrix forums

A read-only archive of the PocketMatrix forums (2001–2014). Posting and accounts are closed.

File system

How are ppc paths set up? I am making a dll in c/c++ just for file operations on a ppc. Well i was using the standard stdio library and it didnt seam to open anything i got all kinds of errors. It may be my code but i dunno if i was using correct path names. lest say you wanna access blah.txt in my docs and your in window would the path be ../My Documents/blah.txt or is it with \'s i dunno what is the deal can someone just post a few path examples.
In C++ the filesystem on a PPC is...

\
\My Documents\
\Program Files\
\Windows\

There are no drive letters per se. Also make sure you are using \\ in place of \ since the \ is an escape senquence. :)

..oh, and by the way the FedEx w/ NSBasic went out today!..
A few more details; relative paths / current working directory is not supported. You have to always provide a full path from the root directory to the file you want to access. You can simulate a current working directory by extracting the path of the executable, and using that for a relative path. See GetModuleFileName for information on retrieving the full path and filename of the running exe. You have to extract the path portion manually.

Many system directories are language specific, such as Program Files and My Documents. Use SHGetSpecialFolderLocation to get the actual location for system directories.

Dan East
ok, thanks guys.

Thank you RIC, for sending out the manual too ;)