filetype

From DavinciWiki
Jump to: navigation, search


Description

Determine the type of file

Arguments and Return Values

Arguments: A string containing the path and or filename

Return Value: a string stating type of file

Usage

Syntax: filetype(filename = STRING)

The filetype function returns the type of a data file. The filetype function returns the following strings for each type recognized:

  • "SPECPR" - Specpr_FS2
  • "VICAR" - VICAR
  • "GRD" - USGS GRD
  • "ISIS" - PDS/ISIS
  • "PNM" - PBMPlus
  • "AVIRIS" - AVIRIS
  • "IMATH" - VM IMath format
  • "ENVI" - ENVI format

The output from the filetype() function is suitable for input to the type value of the write() function.

filetype() does not return any value if the type of file is other than those listed above.

Examples

dv> filetype("../../test.cub")
"ISIS"

DavinciWiki Mini-Nav Bar

Contents


Contact Developers

  • davinci-dev [AT] mars.asu.edu

All other topics

  • See navigation on the left

Related Functions

Recent Core Changes

Modified On: 03-27-2006

Personal tools