[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
random i/o tools
Date: Tue, 10 Jul 90 16:57:09 MDT
From: bein@boulder.Colorado.EDU (Jonathan Bein)
Does anyone in the SLUG community have or know of Symbolics
software that can be used for doing random file i/o? I am doing
some database work and need tools for disk based hashing, B-trees, etc.
to integrate in the software I am developing. I am aware that similar
software components are available in Statiuc, but I need random i/o
utilities that are not embeeded in a proprietary product.
You can do random I/O with the standard stream I/O facilities in Genera.
The Common Lisp FILE-POSITION function can be used on binary streams to
go to any position in the file; this isn't permitted for character
streams because character set translations and character style
expansions make it difficult to determine the physical location in the
file corresponding to a character position. However, there are also the
messages :READ-LOCATION and :SET-LOCATION, which can be used on any
stream; :READ-LOCATION returns an object that represents the current
location in the file, and :SET-LOCATION takes one of these objects and
repositions to that place (the object includes the physical position).
The -LOCATION messages aren't useful for database-style applications,
though, because the location objects are tied to a particular stream, so
they can't be passed around over time.