-- George.mesa  Edited by HGM on November 18, 1980  1:30 PM

DIRECTORY
  DiskKDDefs USING [CountFreeDiskPages, DiskFull],
  File USING [Capability],
  StreamDefs USING [StreamHandle],
  System USING [GreenwichMeanTime];


George: DEFINITIONS IMPORTS DiskKDDefs =
  BEGIN

  BYTE: TYPE = [0..377B];

  Handle: TYPE = PRIVATE StreamDefs.StreamHandle;


  -- D I S K  S P A C E:

  CountFreeDiskPages: PROCEDURE RETURNS [CARDINAL] = INLINE {
    RETURN[DiskKDDefs.CountFreeDiskPages[]]};

  DiskFull: PROCEDURE RETURNS [SIGNAL] = INLINE {RETURN[DiskKDDefs.DiskFull]};


  -- D I R E C T O R Y  and  F I L E S: 

  EnumerateDirectory: PROCEDURE [
    proc: PROCEDURE [File.Capability, STRING] RETURNS [BOOLEAN]];

  -- RETURN nullCapability if troubles
  CreateNewFile: PROCEDURE [STRING, CARDINAL] RETURNS [File.Capability];
  LookupExistingFile: PROCEDURE [STRING] RETURNS [File.Capability];
  NameToCapability: PROCEDURE [STRING, CARDINAL] RETURNS [File.Capability];

  DeleteFileFromDisk: PROCEDURE [File.Capability];


  -- S T R E A M S:

  CreateAppendStream: PROCEDURE [File.Capability] RETURNS [Handle];
  CreateInputStream: PROCEDURE [File.Capability] RETURNS [Handle];
  CreateOutputStream: PROCEDURE [File.Capability] RETURNS [Handle];

  Destroy: PROCEDURE [Handle];

  GetCreateDate: PROCEDURE [Handle] RETURNS [System.GreenwichMeanTime];

  GetIndex: PROCEDURE [Handle] RETURNS [LONG CARDINAL];

  GetLength: PROCEDURE [Handle] RETURNS [LONG CARDINAL];

  SetCreateDate: PROCEDURE [Handle, System.GreenwichMeanTime];

  SetIndex: PROCEDURE [Handle, LONG CARDINAL];


  -- D A T A   T R A N S F E R:

  GetWords: PROCEDURE [Handle, POINTER, CARDINAL] RETURNS [CARDINAL];

  GetByte: PROCEDURE [Handle] RETURNS [BYTE];

  GetWord: PROCEDURE [Handle] RETURNS [WORD];

  PutWords: PROCEDURE [Handle, POINTER, CARDINAL];

  PutChar: PROCEDURE [Handle, CHARACTER];

  PutByte: PROCEDURE [Handle, BYTE];

  PutWord: PROCEDURE [Handle, WORD];



  END.