KNOWLEDGEBASE
Log In    |    Knowledgebase    |    4D Home
Tech Tip: 4D Client Database Folder and Mac OS 10.7 (Lion)
PRODUCT: 4D | VERSION: 12.3 | PLATFORM: Mac
Published On: November 3, 2011

The local database folder for a 4D Client on the Mac OS is placed at:

         :Users:username:Library:Caches:4D:mydatabase_x_x_x_x

If the client computer is running the latest Mac OS, 10.7 (Lion), and you go looking for the users "Library" folder you will not see it in the Mac OS Finder. So where has the folder been moved to?

Actually it is still there! By default, on Mac OS Lion that folder is now an "invisible" folder. So, how do you access that folder when the need arises? There are a number of techniques that work very well.

Technique #1: The 4D code below will reveal the 4D Client Database Folder even while the Library folder is still invisible in the Finder. This code must be executed when 4D is running in "Remote" mode.

SHOW ON DISK(Get 4D folder(4D Client Database Folder))


Technique #2: If you are not in 4D and need to see "all" invisible files and folders the following Applescript is very handy for toggling invisible files between "Show" and "Hide."

tell application "Finder" to quit
display dialog "Show Hidden Files..." buttons {"ON", "OFF"}
    default button 2
copy the result as list to {buttonpressed}

try
   if the buttonpressed is "OFF" then do shell script
      "defaults write com.apple.finder AppleShowAllFiles OFF"
   if the buttonpressed is "ON" then do shell script
      "defaults write com.apple.finder AppleShowAllFiles ON"
end try

tell application "Finder" to activate


The above Applescript can be saved as a "Run only" application, placed in the window title bar on the Finder windows and it will alway be available. See the image below:



Technique #3: It the desire is to perminately make the Library folder visible, use the Terminal application and the following instructions.

The ~/Library folder has a hidden flag. To change the flag of a folder use the chflags command. You type the command + hidden/nohidden + path.

For example: chflags nohidden ~/Library

Commented by Keith Culotta on November 4, 2011 at 6:38 AM
Technique #4: You can also visit the invisible ~/Library folder from the Finder's "Go" menu. From the Finder click the "Go" menu. Press the "option" key and your Home folder's Library will appear in the list.