KNOWLEDGE BASE
Log In    |    Knowledge Base    |    4D Home
Tech Tip: The new functionality of the Get 4D folder command
PRODUCT: 4D | VERSION: 11.2 | PLATFORM: Mac & Win
Published On: March 11, 2009

4D v11 SQL has added extra functionality to the Get 4D folder command.

In addtion to the 6 folder types available as parameters for the command in 4D 2004, the Get 4d folder command has 3 extra folder types and an optional * parameter in version 11.

In 4D 2004, the command had:

ConstantTypeValue
Active 4D FolderLongint0 (default)
Licenses FolderLongint1
Extras FolderLongint2
4D Client Database FolderLongint3
Database FolderLongint4
Database Folder Unix SyntaxLongint5


In 4D v11 SQL, the following parameters were added:

Current Resources folderLongint6
Logs FolderLongint7
HTML Root FolderLongint8


Where:
Current Resources folder returns the Resources folder of the database.
Logs Folder returns the Logs folder of the database.
HTML Root Folder returns the current HTML root folder of the database.

The optional * parameter is used inside a component. It determines the database (host or component) for which you want to get the folder pathname. If the * parameter is passed, the command returns the pathname of the host database folder. Otherwise, it returns the pathname of the component folder. This parameter is only valid for Database Folder, Database Folder Unix Syntax and Current Resources folder folders. It is ignored in all other cases.

Commented by Jesse Pina on March 31, 2009 at 8:38 AM
When using the constant Current Resources folder with the Get 4D folder command from 4D Client, the pathname returned will be that of the Resources folder on the client machine. Here are the paths that will be returned:

Win XP: {Disk}:\Documents and Settings\Current user\Local Settings\Application Data\4D\DatabaseName_Address\Resources
Win Vista: {Disk}:\Users\Current user\AppData\Local\4D\DatabaseName_Address\Resources
Mac OS: {Disk}:Users:User:Library:Caches:4D:DatabaseName_Address:Resources