Category : Alternate Operating Systems - Quarterdeck DesqView, CP/M, etc
Archive   : PCCAPP.ZIP
Filename : FILE.H

 
Output of file : FILE.H contained in archive : PCCAPP.ZIP
/*
* This file is part of the Choices Operating System
* Developed by: The TAPESTRY Parallel Computing Laboratory
* University of Illinois at Urbana-Champaign
* Department of Computer Science
* 1304 W. Springfield Ave.
* Urbana, IL 61801
*
* Copyright (c) 1987, 1988, 1989, 1990, 1991, 1992
* The University of Illinois Board of Trustees.
* All Rights Reserved.
*
* Author: Lee Lup Yuen ([email protected])
* Project Manager and Principal Investigator: Roy Campbell ([email protected])
*
* Funded by: NSF TAPESTRY Grant No. 1-5-30035, NASA ICLASS Grant
* No. 1-5-25469 and No. NSG1471 and AT&T Metronet Grant No. 1-5-37411.
*
* Permission to use, copy, modify, and distribute this software and
* its documentation for educational, research, and non-profit purposes
* is hereby granted provided that the above copyright notice, the
* original authors names, and this permission notice appear in all such
* copies and supporting documentation; that no charge be made for such
* copies; and that the name of the University of Illinois not be used
* in advertising or publicity pertaining to distribution of the
* software without specific prior written permission. Any entity
* desiring permission to incorporate this software into commercial
* products should contact the Computing Research Laboratory, Department
* of Computer Science, University of Illinois, 1304 W. Springfield
* Avenue, Urbana, IL 61801. The University of Illinois makes no
* representations about the suitability of this software for any
* purpose. It is provided "as is" without express or implied warranty.
*/

#ifndef File_h
#define File_h

#include "ProxiableObject.h"

class File : public ProxiableObject
{
/* A file is an array of bytes that is persistent and is accessed sequentially
* according to a pointer that may be repositioned. When we say that
* an object is "persistent", we mean that the object contains a state
* that is maintained even after the application has terminated.
* The file pointer is initially positioned at the beginning of the file.
* Applications do not deal with Files directly; they are supposed to
* use FileStreams instead. See FileSystemInterface.h or fsi.h for
* more details about the filesystem. Files are primarily used to
* translate machine-independent FileStream calls into machine-dependent
* calls.
*/
public:
/* Method read: Read count bytes from the file (at the current pointer)
* into buffer, and advance the pointer. Return the number of bytes
* actually written into buffer. buffer must be large enough to hold
* count characters.
*/
virtual int read (char *buffer, int count) = 0;

/* Method write: Write count bytes from buffer into the file at the
* current pointer, and advance the pointer. Return the number of bytes
* actually written into file.
*/
virtual int write (const char *buffer, int count) = 0;

/* Method offset: Return the offset of file pointer from beginning of
* the file (See ftell(3) in a UNIX Manual).
*/
virtual int offset () = 0;

/* Method setOffset: Set file pointer (See fseek(3) in a UNIX Manual)
* Change the current offset of the file pointer using the mode and delta
* parameters as follows:
*
* mode interpretation file pointer will be set to
* 0 beginning of file delta
* 1 current offset current offset + delta
* 2 end of file fileSize + delta
*/
virtual int setOffset (int delta, int mode) = 0;
};

#endif


  3 Responses to “Category : Alternate Operating Systems - Quarterdeck DesqView, CP/M, etc
Archive   : PCCAPP.ZIP
Filename : FILE.H

  1. Very nice! Thank you for this wonderful archive. I wonder why I found it only now. Long live the BBS file archives!

  2. This is so awesome! 😀 I’d be cool if you could download an entire archive of this at once, though.

  3. But one thing that puzzles me is the “mtswslnkmcjklsdlsbdmMICROSOFT” string. There is an article about it here. It is definitely worth a read: http://www.os2museum.com/wp/mtswslnk/