[MAC OS X] User Preference Folder

Got an idea for enhancing PureBasic? New command(s) you'd like to see?
SEO
Enthusiast
Enthusiast
Posts: 178
Joined: Fri Dec 09, 2005 11:42 pm
Location: Sweden
Contact:

[MAC OS X] User Preference Folder

Post by SEO »

On Mac OS X an 'FolderPointer' is needed to get the Users Preference Folder. This is used to store the Users 'Preference files'.

The structure is Users/myUserName/Library/Preferences
The problem is to get the 'UserName' ... So it is possible to build the 'path' String....

I think on OS X 10.4.x the folder names are the same, and not depending on the Language settings... (I don't remember how it was on 10.3.x)

On OS X there are also a lot of folders in the 'UserName' folder that store stuff for just that user...

So an 'Pointer' to the folder: UserName should fix a lot of problems.. Perhaps an Constant like this: #PB_UserDirectory so I could build an string like this:
FileName$ = #PB_UserDiectory + "Library/Preferences/myAppPrefs/myPrefsFile.txt"

I have tried to find an 'workaround' about this using ExamineDirectory and DirectoryEntryAttributes but Nope...

Regards,
SEO
Fred
Administrator
Administrator
Posts: 18162
Joined: Fri May 17, 2002 4:39 pm
Location: France
Contact:

Post by Fred »

The next version of PB has a GetHomeDirectory() which will returns exactly what you want.
User avatar
netmaestro
PureBasic Bullfrog
PureBasic Bullfrog
Posts: 8451
Joined: Wed Jul 06, 2005 5:42 am
Location: Fort Nelson, BC, Canada

Post by netmaestro »

What else has it got?
Last edited by netmaestro on Wed Feb 22, 2006 5:29 am, edited 3 times in total.
BERESHEIT
Fred
Administrator
Administrator
Posts: 18162
Joined: Fri May 17, 2002 4:39 pm
Location: France
Contact:

Post by Fred »

Hum, a lot of stuff, it would take too much time to list them all.. Back to code :).
SEO
Enthusiast
Enthusiast
Posts: 178
Joined: Fri Dec 09, 2005 11:42 pm
Location: Sweden
Contact:

Post by SEO »

THANKS!
/SEO
Post Reply