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

 
Output of file : DOSFILES.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 DOSFileSystemInterface_h
#define DOSFileSystemInterface_h
#ifdef __GNUG__
#pragma once
#pragma interface
#endif

#include "FileSystemInterface.h"
class File;
class VirtualPCInterface;

class DOSFileSystemInterface : public FileSystemInterface
{
/* A DOSFileSystemInterface provides DOS filesystem services to application
* programs. All path arguments may use drive specifiers (eg. "d:") and
* both path separators '/' or '\' are recognized.
*/
public:
DOSFileSystemInterface ();
~DOSFileSystemInterface ();

/* 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. In the current implementation, mode is ignored and
* the only valid value for cls is WriteFileStreamClass.
*/
StoredObjectRef create (const char *path, UserClass *cls,
int mode, int &status);

/* 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.
* In the current implementation, mode is ignored and the only valid
* value for cls is WriteFileStreamClass.
*/
StoredObjectRef openOrCreate (const char *path, UserClass *cls,
int mode, int &status);

/* 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. In the current implementation,
* the only values for cls are ReadFileStreamClass and
* WriteFileStreamClass.
*/
StoredObjectRef open (const char *path, UserClass *cls,
int &status);

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

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

private:
// The application programmer should not have to be concerned about
// the following "basic" methods. These "basic" methods are called
// by the corresponding non-"basic" methods above. For example,
// open() calls basicCreate(). The non-"basic" methods check the
// class argument for validity (eg. you're not supposed to call create()
// and specify the ReadFileStreamClass as the second argument). After
// the checking has been done, the "basic" methods are called to
// return a File object for the file to be opened. The "basic" methods
// are therefore machine-specific. The File object returned to
// the non-"basic" methods are used to create ReadFileStreams and
// WriteFileStreams.

/* Method basicCreate: Create the file named "path" and return a File
* representing the new 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.
*/
File *basicCreate (const char *path, int &status, int mode);

/* Method basicOpenOrCreate: Open the file named "path" and return File
* representing the opened 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.
*/
File *basicOpenOrCreate (const char *path, int &status, int mode);

/* Method basicOpen: Open the file named "path" and return a File
* representing the opened 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.
*/
File *basicOpen (const char *path, int &status, unsigned short mode);

/* Method setVirtualPCErrorCode: Translate err, a VirtualPC error code,
* into a filesystem error code and write it into status. Filesystem
* error codes are described in FileSystem.h (or fs2.h).
*/
void setVirtualPCErrorCode (int err, int &status);

/* Method setDOSErrorCode: Translate err, a DOS error code, into a
* filesystem error code and write it into status. Filesystem error
* codes are described in FileSystem.h (fs2.h).
*/
void setDOSErrorCode (int err, int &status);

VirtualPCInterface *virtualPC; // VPCInterface used for calling DOS.
};

#endif


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