Is there a specialfolderpath available for the 'Library' folder on a mac?
I can find the preferences one using the following, but obviously Id prefer my database to be stored in the library and not the preferences!
put specialfolderpath("preferences") & "/myApp/myDB.db" into dbPath
Path to library
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller
-
- VIP Livecode Opensource Backer
- Posts: 1005
- Joined: Sat Apr 08, 2006 3:06 pm
- Location: Overland Park, Kansas
- Contact:
I don't know of a code that points directly to the Library but "asup" will point to the Application support folder in the root library "/Library/Application Support". I imagine you would want to store your data in this sub folder in any case so maybe that will work for you.
To get the users app support folder (/Users/USERNAME/Library/Application Support) you can do the following:
Rev will convert "~" to the users home folder for you and then you can just append the value of specialfolderpath("asup"). This technique is more reliable than using the $HOME environmental variable which is not always set.
To get the users app support folder (/Users/USERNAME/Library/Application Support) you can do the following:
Code: Select all
put the defaultfolder into theDefaultFolder
set the defaultfolder to "~"
put the defaultfolder & specialfolderpath("asup") into thePath
set the defaultfolder to theDefaultFolder
Trevor DeVore
ScreenSteps - https://www.screensteps.com
LiveCode Repos - https://github.com/search?q=user%3Atrevordevore+topic:livecode
LiveCode Builder Repos - https://github.com/search?q=user%3Atrevordevore+topic:livecode-builder
ScreenSteps - https://www.screensteps.com
LiveCode Repos - https://github.com/search?q=user%3Atrevordevore+topic:livecode
LiveCode Builder Repos - https://github.com/search?q=user%3Atrevordevore+topic:livecode-builder