|
Usage |
finder [options] [<ACEfile.ace>] <Class>
The finder command tells you which file is loaded when searching
for an Eiffel <Class>.
When an Eiffel file is found, finder prints the full path name
on standard output.
The exit status is set GENERAL.exit_success_code only when an
existing file is found (thus allowing usage of command finder
in shell scripts).
As for other commands, when the ACE file mode is used, only the content of the <ACEfile.ace> file is used to search the source file.
To see the loading path used by SmartEiffel, you can for example type the finder command using a bad (inexistant) class name.
In ACE file mode, the loading path can be updated by modifiying the
ACE file iteself.
In traditional mode (i.e. no ACE file), the default loading path
may also be updated (see also how to use the
special
"loadpath.se"
file).
Options |
Where Does finder Search? |
The algorithm used by SmartEiffel to look for an Eiffel source file is the following:
1. Lower case filenames - SmartEiffel looks all along the loading path using <class> name in lower case as tail. If needed, the Eiffel suffix (".e") is added automatically. SmartEiffel only looks for suffixed files on the disk. Only the first file encountered according to the order of the path is taken in account. File is always supposed to have the same name as the inside class definition.
2. Renamed files -
When the above search has failed to find a file, SmartEiffel tries
to search for files "rename.se" in all directories of the path.
A file "rename.se" allows the user to put in file "foo" the class
"bar" for example.
Such renaming facilities has been added especially for DOS (file
names are limited to 8 characters).
Each line of a "rename.se" file is a renaming directive containing
two names, first the full name and then the short name to use in the
directory where the "rename.se" file is.
File "SmartEiffel/misc/rename.se" is an example of such a file.
Thus, knowing the algorithm of SmartEiffel to find a class file, it is better not to use the renaming facilities to speed up class loading.
3. Upper case filenames - Finally,
when both previous steps did not find the required Eiffel class file,
SmartEiffel looks along the loading path for a file bearing the class
name upper in upper case letters.
If needed, the Eiffel suffix ".e" is added automatically.
One must note that the overhead to find an upper case file name is
not negligeable at all and that a lower case file name may hide some
upper case name.