![]() |
CCP4i: Graphical User Interface |
Documentation for Programmers | |
GetFileFormat |
![]() ![]() ![]() |
GetFileFormat - Get the CCP4i standard name for a file format
GetFileFormat filename [default]
For the given file name filename work out the file format based on the file extension and return the CCP4i standard name for a file format. If the file extension does not correspond to any registered with CCP4i then return the default default which is usually a null character.
The file formats and extensions known to CCP4i are defined in $CCP4I_top/etc/types.def. For example the line defining the heavy atom file type is:
set typedef(_ha_file) {file HA .ha "Heavy atom frac coord" {"Edit HA file"} {HAViewer} }Here the information relating to the HA file type is stored as the _ha_file element of the typedef array. The information is in the form of a list (the braces { } enclose the items in the list). The items of the list are: