finder


finder <Class>

Command finder 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).

To see the loading path used by SmallEiffel, you can for example type the finder command using a bad (inexistant) class name. The default loading path may be updated (see READ_ME file of the sys directory).

Without argument, finder command prints this help.

The algorithm used by SmallEiffel to search for an Eiffel source file has two major steps.

1. First Step - SmallEiffel looks all along the loading path using <class> name in lower case as tail. If needed, the Eiffel suffix (".e") is added automatically. SmallEiffel 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. Second Step is done only when first step has failed to find a file. SmallEiffel 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 manes is 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 "SmallEiffel/misc/rename.se" is an example of a "rename.se" file to put in SmallEiffel/lib_std/ for DOS.

Thus, knowing the algorithm of SmallEiffel to find a class file, it is better not to use the renaming facilities to speed up class loading.

3. Third Step - Finally, when previous steps give no path, SmallEiffel looks along the loading path using <class> name in upper case as tail. If needed, the Eiffel suffix (".e") is added automatically.
One must note that the overhead to find an upper case file name is not negigeable at all and that a lower case file name may hide some upper case name.

Changing the default loading path
To change the default loading path, you need to add a special file which name is "loadpath.se" in the directoy you type a command of SmallEiffel (compile, finder, pretty, ...).
Each line of the file "loadpath.se" must be an existing directory path.
All directories of file "loadpath.se" are prepend to the default loading path.

[Line]
Copyright © Dominique COLNET and Suzanne COLLIN - <colnet@loria.fr>
Last update: Saturday November 22, 1997