Filetype()

Finds out the type of a datafile (if recognized by Open GENIE).

FILETYPE [file=String] Return a string giving the data file type.

example:

	# Check the type of a file
	printn Filetype("HRP00389.RAW")
	raw

Note: "file" defaults to the type of the default input file if there is one.

Filetype

The filetype command makes the process Open GENIE uses to determine file types available to the user. By using the Filetype() command it is possible to write Open GENIE procedures which from the outside appear independent of input file type but internally take account of different data formats.

Parameters:

File (String) [ default = currently selected input file (via the Set() command) ]

File which is being tested.

RESULT = (String)

One of the following strings depending on the type of the file.

"<unknown>" Filetype unknown to Open GENIE
"raw" ISIS original format raw data file
"G2 intermediate" GENIE-V2 intermediate file
"G3 intermediate" Open GENIE intermediate file
"CRPT" ISIS Current Run Parameter Table
"HDF" HDF format data file
"ASCII" Plain text (ASCII) file
"<directory>" A directory file on the host system
"G3 ASCII" Open GENIE ASCII dump formatted file

this is only a mininum set of file types. If you have a file reading routine please mail genie@isise.rl.ac.uk and we will investigate adding your data file as one recognized by Open GENIE.