| 4D v18Structure file | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 
 | 
    4D v18
 Structure file 
         | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Structure file {( * )} -> Function result | ||||||||
| Parameter | Type | Description | ||||||
| * | Operator |   | Returns structure file of host database | |||||
| Function result | String |   | Long name of the database structure file | |||||
The Structure file command returns the pathname of the structure file for the database with which you are currently working.
Note: In the particular case of a database that has been compiled and merged with 4D Volume Desktop, this command returns the pathname of the application file (executable application) under Windows and macOS. Under macOS, 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 when using 4D in remote mode, only the name of the structure/project file is returned; the pathname is not returned.
The optional * parameter is useful in the case of an architecture using components: it can be used to determine the structure (host or component) for which you want to get the pathname depending on the context in which the command is called:
This example displays the name and the location of the structure file currently in use:
 C_OBJECT($fullpath)
 C_TEXT($name;$path)
 If(Application type#4D Remote mode)
    $fullpath:=Path to object(Structure file)
    $name:=$fullpath.name
    $path:=$fullpath.parentFolder
    ALERT("You are currently using the database "+Char(34)+$name+Char(34)+" located at "+Char(34)+$path+Char(34)+".")
 Else
    ALERT("You are connected to the database "+Char(34)+Structure file+Char(34))
 End ifThe following example can be used to find out whether the method is called from a component:
 C_BOOLEAN($0)
 $0:=(Structure file#Structure file(*))
  ` $0=True if method is called from a component
									_o_DATA SEGMENT LIST
									
									Application file
									
									COMPONENT LIST
									
									Data file
									
	Product:  4D
	Theme:  4D Environment
	Number:  
        489
        
        
        
	
	Modified:  4D v11 SQL  
	4D Language Reference ( 4D v18)
	
	
	
 Add a comment
Add a comment