Overview
In addition to the standard Input and Output streams provided by CLisp, the user also has the ability to create streams directly to files for manipulation. The value of the standard streams can even be changed to be an open file stream. The creation of file streams is a relatively simple process and CLisp provides a wide variety of functions. In general, the structure of the CLisp file interface is designed to be portable from one operating system to another. In order to do this, CLisp provides two ways to designate a path to a file. One is by using "namestrings" while the other uses a more abstract "pathname." CLisp provides functions for converting these designations to suit the user's needs.
The basic file function is the Open function. This function determines the direction of the stream -- input, output, IO -- the type of elements -- binary, unsigned-byte, etc. -- and any special formatting protocols. In other words, the open function acts as a kind of factory for streams. Other functions allow the user to read and write various types and sizes of data, delete files and create new files and directories. The act of closing a file stream closes the file and breaks the association between the two.
References
HyperSpec
Implementation
Java Classes
Types
| Lisp Type |
Java Interface |
Description |
Status |
| stream |
FileStream.java |
The java interface for Lisp type stream concerning files of package lisp.common.type. |
Implemented |
| stream |
FileStreamImpl.java |
Abstract class which defines all possible functions of the stream class when dealing with files. At this level, all functions throw exceptions. |
Implemented |
| stream |
CharacterIOFileStream.java |
Concrete class which represents a stream of element type character, direction IO, and dealing with files. Other classes listed follow the same pattern in naming convention. |
Implemented |
| stream |
CharacterInputFileStream.java |
"" |
Implemented |
| stream |
CharacterOutputFileStream.java |
"" |
Implemented |
| stream |
CharacterProbeFileStream.java |
"" |
Implemented |
| stream |
SignedByteIOFileStream.java |
"" |
Implemented |
| stream |
SignedByteInputFileStream.java |
"" |
Implemented |
| stream |
SignedByteOutputFileStream.java |
"" |
Implemented |
| stream |
SignedByeProbeFileStream.java |
"" |
Implemented |
| stream |
UnsigneedByteIOFileStream.java |
"" |
Implemented |
| stream |
UnsignedByteInputFileStream.java |
"" |
Implemented |
| stream |
UnsignedByteOutputFileStream.java |
"" |
Implemented |
| stream |
UnsignedByteProbeFileStream.java |
"" |
Implemented |
| stream |
FileStreamFactory.java |
Class which determines which stream to return, given the components given from the Open function. |
Unimplemented |
Discussions
Links to Blog issues
Status:
- Completed implementation with new Open function (which works with Pathname).
Release Level:
Open bug count:
Test Suites
Links to JUnit results
--
JerryBoetje - 12 Jul 2003
Topic revision: r5 - 2009-02-11 - 19:14:42 -
MeganLusher