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

 
Output of file : FSI.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: Peter W. Madany ([email protected])
* Contributing Author: Vincent F. Russo ([email protected])
* Contributing Author: Douglas E. Leyens ([email protected])
* Contributing 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.
*/
/*
* FileSystemInterface.h - user file system interface class
*/

#ifndef FileSystemInterface_h
#define FileSystemInterface_h
#ifdef __GNUG__
#pragma once
#pragma interface
#endif

#include "ProxiableObject.h"
#include "StoredObjectStar.h"
class UserClass;

class FileSystemInterface : public ProxiableObject
{
/* The FileSystemInterface class is a generic interface to a generic file
* system. This is specialized for specific filesystem types such as
* DOSFileSystemInterface. The global variable StandardFileSystemInterface
* always points to the specific FileSystemInterface that applications
* should use to access the filesystem.
*
* Brief explanation of the filesystem framework in Choices: the FileSystem
* Interface is primarily used by applicatins to open files. When a file is
* opened, a StoredObject is returned to the caller, and methods on that
* object may be called to manipulate the contents of the file. Users
* may specify a particular subclass of StoredObject for the object
* to be returned. A FileStream is a type of StoredObject that interprets
* the file contents as a stream of bytes. ReadFileStream and
* WriteFileStream are subclasses of FileStream that enable the user to read
* and write, respectively, to the file at the byte level. Automatic
* garbage collection permit the StoredObject to be closed and deleted
* automatically when no longer in use.
*
* Each StoredObject is associated with an underlying File, which is a
* machine-dependent handle to an actual file stored on disk. File is
* a generic class whose subclasses represent file handles for specific
* filesystems (eg. DOSFile). Files are also accessed at the byte level.
* StoredObject and its subclasses are responsible for translating
* their operations into byte-level operations on the underlying Files.
*
* In this filesystem framework, applications only need to work directly
* with FileSystemInterfaces and StoredObjects (including all subclasses).
* All other objects should not be manipulated directly by applications.
*/
public:
/* Method create: Create the file named "path" and return a StoredObject
* of class cls for writing to the file. mode indicates the permissions
* for the new file. Write into status one of the error codes described
* in FileSystem.h (or fs2.h). If the file already exists, report the
* error in status.
*/
virtual StoredObjectRef create (const char *path, UserClass *cls,
int mode, int &status) = 0;

/* Method openOrCreate: Open the file named "path" and return a
* StoredObject of class cls for writing to the file. Write into status
* one of the error codes described in FileSystem.h (or fs2.h). If the
* file already exists, it is truncated to null. If the file doesn't
* exist, it is created and its permissions are set according to mode.
*/
virtual StoredObjectRef openOrCreate (const char *path, UserClass *cls,
int mode, int &status) = 0;

/* Method open: Open the file named "path" and return a StoredObject of
* class cls for writing to the file. Write into status one of the error
* codes described in FileSystem.h (or fs2.h). If the file doesn't
* exist, report the error in status.
*/
virtual StoredObjectRef open (const char *path, UserClass *cls,
int &status) = 0;

/* Method chdir: Change the current directory to dirname. Return one
* of the error codes described in FileSystem.h (or fs2.h).
*/
virtual int chdir (const char *dirname) = 0;

/* Method unlink: Delete the file named "pathname". Return one of the
* error codes described in FileSystem.h (or fs2.h).
*/
virtual int unlink (const char *pathname) = 0;
};

// This variable is used by applications for accessing filesystem services.
extern FileSystemInterface *StandardFileSystemInterface;

#endif FileSystemInterface_h


  3 Responses to “Category : Alternate Operating Systems - Quarterdeck DesqView, CP/M, etc
Archive   : PCCAPP.ZIP
Filename : FSI.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/