Portable Structure of File Names

filenamesportablefilenames

Another problem with file names is the variation of their structure between environments. Here are examples of some of the formats that prevail:

   UNIX   /device/dir1/dir2/name
   VMS    node::device:[dir1.dir2]name.ext;vn
   MSDOS  device:\dir1\dir2\name.ext
   MAC    device:dir1:dir2:name

Isn't it amazing that none of these popular systems use the same format?

The solution to dealing with these different formats is to classify them as non-portable and hide the functions that manipulate them in the machine-specific module of FunnelWeb. Luckily there are not many such functions.

The main problem is coping with file systems that do not explicitly support file extensions. With so many possible input and output files, FunnelWeb all but needs such extensions. Machines that do not support them pose difficult design decisions. If the user specifies sloth as an input file on such a non-extension-supporting system, should FunnelWeb look for sloth or sloth.fw? If the user specifies walrus as a listing file, should it generate walrus or walrus.lis?

Some possible solutions are:

  1. Regard the filename sloth as having an empty extension. It will then default to sloth.fw.

  2. Regard the filename sloth as having a blank but full extension. That is, it cannot be overwritten by inheritance, but it remains blank.

  3. Provide an extra syntactic mechanism to allow the user to specify one or other of the two options above.

My solution was to choose the first option. Use of FunnelWeb results in lots of files lying around (sloth.lis) and it is hard to see how the user will cope with them all without some kind of naming discipline. If a naming discipline has to be used, it might as well be the FunnelWeb one.

Thus the names of all files read and written by FunnelWeb will have a file extension of from zero to three letters separated from the rest of the filename by a ..

The only exception is product files whose extension is left undefined. Product files need not contain a . and a file extension, although they can inherit one if the user wishes.