System folder

4D - Documentation   Français   English   German   Spanish   4D v11 SQL, Command Theme List   4D v11 SQL, Command Alphabetical List   4D v11 SQL, Constant Theme List   Back   Previous   Next

version 11.3 (Modified)


System folder {(type)} String

ParameterTypeDescription
typeLongintType of system folder
Function resultStringPathname to a system folder

Description

The System folder command returns the pathname to a particular folder of the operating system or to the active Windows or Mac OS System folder itself.

You pass in the optional type parameter a value indicating the type of system folder. 4D provides you with the following predefined constants, placed in the "System Folder" theme:

ConstantTypeValue
SystemLong Integer0
FontsLong Integer1
Preferences or Profiles_AllLong Integer2
Preferences or Profiles_UserLong Integer3
Startup Items_AllLong Integer4 (obsolete under Mac OS, see note 1)
Startup Items_UserLong Integer5 (obsolete under Mac OS, see note 1)
Mac Shutdown Items_AllLong Integer6 (obsolete, see note 1)
Mac Shutdown Items_UserLong Integer7 (obsolete, see note 1)
Apple or Start Menu_AllLong Integer8 (obsolete under Mac OS, see note 1)
Apple or Start Menu_UserLong Integer9 (obsolete under Mac OS, see note 1)
Mac ExtensionsLong Integer10 (obsolete, see note 1)
Mac Control PanelsLong Integer11 (obsolete, see note 1)
System WinLong Integer12
System32 WinLong Integer13
Favorites WinLong Integer14
Desktop WinLong Integer15
Program Files WinLong Integer16

Notes:

The folders corresponding to constants 4 to 11 no longer exist under Mac OS X (they were used under Mac OS 9 only). When these constants are used under Mac OS, System folder returns an empty string.

Constants 6, 7, 10 and 11 (Mac OS only) are thus totally obsolete starting with version 2004 of 4D. Constants 4, 5, 8 and 9 however can still be used under Windows.

The constants 12 to 14 can be used on Windows only. When they are used on Mac OS, System folder will return an empty string.

The constants 15 (Desktop Win) and16 (Program Files Win) can be used under Mac OS. They return, respectively, the path of the desktop folder of the user and the path of the Applications folder.

The pathnames to some system folders can specific to the current user. Constants 2 to 9 allow you to choose whether you want to obtain the pathname to a folder which is shared by all users, or customized for the current user.

If you omit the type parameter, the function will return the pathname to active System folder (= constant System).

See Also

Get 4D folder, Temporary folder.


4D - Documentation   Français   English   German   Spanish   4D v11 SQL, Command Theme List   4D v11 SQL, Command Alphabetical List   4D v11 SQL, Constant Theme List   Back   Previous   Next