filenameinheritance
Inheritance in filenames refers to how input and output files inherit parts
of their name from other filenames and their environment. For example if
the command
fw sloth +J +L +T
was issued,
you would expect to see output files sloth.jrn, sloth.lis, and
sloth.tex.
The output file names have inherited the sloth. The following table
gives the hierarchy devised for FunnelWeb.
|
Script |
Input |
Include |
Journal |
List |
Document |
Product |
1 |
|
|
@i |
|
|
|
@o |
2 |
+x |
+f |
+i |
+j |
+l |
+t |
+o |
3 |
.fws |
.fw |
.fwi |
.jrn |
.lis |
.tex |
|
4 |
|
|
+f |
+f |
+f |
+f |
|
5 |
DefDir |
Defdir |
Defdir |
Defdir |
Defdir |
Defdir |
Defdir |
The following notes explain the table.
- This scheme is similar to that used in FunnelWeb V1.
- The journal, list, and documentation
files all fall in the same pattern and
can be considered as a single case.
- Level 1 has the highest priority because it is a direct specification
by the user in the input file.
- Level 2 comes next because this is also a direct specification
from the user on the command line.
- Level 3 provides the default file extensions.
Product files do not inherit an
extension as they could be of any type.
- Level 5 is built into most operating systems' file specification systems.
If I specify file x.y, it is taken to mean on the default disk in the
default directory.
- Level 4 looks straightforward, but secretly conceals a difficult design
decision. By the time we get down to this level of inheritance, we know for
sure that the filename has already picked up a file extension. So all that
is left to inherit is the path and the filename proper. Obviously we
have to inherit the filename proper (e.g. sloth in sloth.tex), but
should we inherit the input file path? If we do inherit the input file
path, files will be placed in the same directory as the input file. If we
don't inherit the input file path, files will be placed in the current
directory. The choice I have made is to send all the logging type files
into the same directory as the input file. This means, for example,
that sloth.lis and sloth.tex will generally land in the same directory
as sloth.fw. However, I have decided that output files should be sent to
the default directory (if not earlier specified) as this is where the
action is. In normal use, the main product of FunnelWeb will be product files
and so the user will expect them to appear in the current directory by
default.