Structure file

4D - Documentation   Français   English   German   4th Dimension 2004, Command Theme List   4th Dimension 2004, Command Alphabetical List   4th Dimension 2004, Constant Theme List   Back   Previous   Next

version 2004.2 (Modified)


Structure file String

ParameterTypeDescription
This command does not require any parameters
Function resultStringLong name of the database structure file

Description

The Structure file command returns the long name of the structure file for the database with which you are currently working.

On Windows

If, for example, you are working with the database MyCDs located in \DOCS\MyCDs on the volume G, the command returns G:\DOCS\MyCDs\MyCDs.4DB.

On Macintosh

If, for example, you are are working with the database located in the folder Documents:MyCDsƒ: on the disk Macintosh HD, the command returns Macintosh HD:Documents:MyCDsƒ:MyCDs.

Note: In the particular case of a database that has been compiled and merged with 4D Runtime, this command returns the pathname of the application file (executable application) under Windows and Mac OS. Under Mac OS, this file is located inside the software package, in the [Contents:Mac OS] folder. This stems from a former mechanism and is kept for compatibility reasons. If you want to get the full name of the software package itself, it is preferable to use the Application file command. The technique consists of testing the application using the Application type command, then executing Structure file or Application file depending on the context.

WARNING: If you call this command while running 4D Client, only the name of the structure file is returned; the long name is not returned.

Example

This example displays the name and the location of the structure file currently in use:

   If (Application type#4D Client)
      $vsStructureFilename:=Long name to file name (Structure file)
      $vsStructurePathname:=Long name to path name (Structure file)
      ALERT("You are currently using the database "+Char(34)+$vsStructureFilename+Char(34)+
                                 " located at "+Char(34)+$vsStructurePathname+Char(34)+".")
   Else
      ALERT("You are connected to the database "+Char(34)+Structure file+Char(34))
   End if
      

Note: The project methods Long name to file name and Long name to path name are listed in the section System Documents.



See Also

Application file, Data file, DATA SEGMENT LIST.


4D - Documentation   Français   English   German   4th Dimension 2004, Command Theme List   4th Dimension 2004, Command Alphabetical List   4th Dimension 2004, Constant Theme List   Back   Previous   Next