Unfortunately, because the `.' (dot) character is used both to separate a file extension from its file name and also to separate fields in an NDF (or HDS) object name, ambiguities can sometimes arise. For example, if the dataset name:
datafile.fit
is supplied, it might mean a foreign (FITS ) data file with a `.fit' extension, or it might identify an NDF structure called FIT residing within an HDS file called datafile.sdf. In such cases, the NDF library always uses the former interpretation. That is, it attempts to access (or create) a foreign format file whenever a file extension appears to be present and corresponds with a known foreign data format. For example, if `.xyz' is a recognised foreign file extension, then:
myfile.xyzand
my.file.xyz
are both references to foreign format files rather than HDS objects (although they may not necessarily be valid file names on all operating systems). Conversely:
yourfile.abc
Would not identify a foreign file if `.abc' is not a recognised foreign file extension.
On UNIX, where the file system is case sensitive, it is possible to circumvent this behaviour by exploiting the case insensitivity of HDS component names. For instance, if `.img' (lower case) is a recognised foreign file extension, then the dataset name:
anyfile.IMG
with `.IMG' in upper case, refers to a native format NDF (an object called IMG contained within the HDS file anyfile.sdf). To leave this possibility open, it is recommended that foreign file extensions should always contain at least one lower case character.