* Updated Tedit files for a few Lispusers packages--formatting and typos * Format OBJECTWINDOW.TEDIT, delete WHEELSCROLL.TXT * Create CLIPBOARD.TEDIT Small (formatted) documentation file
42 lines
6.2 KiB
Plaintext
42 lines
6.2 KiB
Plaintext
Medley PSEUDOHOSTS
|
||
2
|
||
|
||
4
|
||
|
||
1
|
||
|
||
PSEUDOHOSTS
|
||
1
|
||
|
||
4
|
||
|
||
By Ron Kaplan
|
||
This document was created in January 2022.
|
||
|
||
A pseudohost identifies the root of a file system that exists as a subdirectory of another pre-existing file system. This gives a shorthand way of operating on a file in the subdirectory of a particular project without having to specify in the name of that file the entire path to its location in a larger file system. For example, suppose that the variable MEDLEYDIR contains the path from {DSK} to the subdirectory that contains all Medley system files (e.g. {DSK}<Users>kaplan>Local>medley>). If not connected to that subdirectory, then the file COREIO, say, would have to be reference as
|
||
{DSK}<Users>kaplan>Local>medley>sources>COREIO.
|
||
If MED is defined as a pseudohost with MEDLEYDIR as its prefix, then that file can also be identified more succinctly as {MED}<sources>COREIO.
|
||
This package implements pseudohost file devices that allow files to be specified and manipulated in this way. The function PSEUDOHOST defines a new pseudohost whose files coincide with the files at the end of a prefix directory path:
|
||
(PSEUDOHOST HOST PREFIX) [Function]
|
||
For the Medley example, executing (PSEUDOHOST 'MED MEDLEYDIR) will set up MED as a (pseudo) host name that can be used to reference Medley system files. (The full filenames can also be used--the pseudohost just provides a systematic abbrevation.) If PSEUDOHOST is called with the host of a previous invocation but a different prefix, the new prefix replaces the old. If the prefix is NIL, the pseudohost is removed. If HOST is a list and PREFIX is NIL, HOST is interpreted as a (host prefix) pair.
|
||
The target host defaults to DSK if PREFIX does not have an explicit host.
|
||
When PSEUDOHOSTS is loaded, it executes
|
||
(PSEUDOHOST 'LI LOGINHOSTDIR)
|
||
so that files in the login directory can always be referenced succinctly with host LI, even while connected to another directory.
|
||
|
||
(PSEUDOHOSTS) [Function]
|
||
Returns the (host prefix) pairs of all currently defined pseudohosts.
|
||
(PSEUDOHOSTP HOST) [Function]
|
||
Returns the (host prefix) pair for a particular pseudohost, NIL if HOST is not a pseudohost.
|
||
(TARGETHOST HOST) [Function]
|
||
Returns the target host of a particular pseudohost, NIL if HOST is not a pseudohost.
|
||
(TRUEFILENAME FILE) [Function]
|
||
Returns the name of FILE in its true device, essentially replacing FILE's host by its prefix if it is a pseudohost. Returns FILE (possibly extended with the prefix of the connected directory) if its host is not a pseudohost. FILE may be a stream as well as a name.
|
||
(PSEUDOFILENAME FILE) [Function]
|
||
Returns the name of FILE in its pseudo device, if any, essentially replacing FILE's prefix by the hostname of a pseudodevice for that prefix. Returns FILE (possibly extended with the prefix of the connected directory) if it does not match a pseudohost prefix. FILE may be a stream as well as a name.
|
||
|
||
|
||
|
||
|