--  DirectoryTrees.mesa (last edited by: Marzullo on: January 14, 1981  3:19 PM)	


DIRECTORY
  DirectoryInternal,
  File USING [Capability];
  
DirectoryTrees: DEFINITIONS =
--  this interface defines the operations on directory B-Trees and Directory Trees, as well as a few extras

BEGIN

  BTreeDelete: PROC
    [dir: LONG POINTER TO DirectoryInternal.DirectoryDescriptor, name: LONG STRING, doSD: BOOLEAN]
    RETURNS [ok: BOOLEAN, cap: File.Capability, isSD: BOOLEAN];
    
  BTreeFind: PROC [dir: LONG POINTER TO DirectoryInternal.DirectoryDescriptor, name: LONG STRING]
    RETURNS [
      ok: BOOLEAN, cap: File.Capability, isSD: BOOLEAN,
      ent: DirectoryInternal.DirectoryEntryHandle];
      
  BTreeEmpty: PROC [dir: LONG POINTER TO DirectoryInternal.DirectoryDescriptor] RETURNS [BOOLEAN];
  
  BTreeGetNext: PROC
    [dir: LONG POINTER TO DirectoryInternal.DirectoryDescriptor, name: LONG STRING, nextName: LONG STRING, mask: LONG STRING ← NIL]
    RETURNS [cap: File.Capability];
    
  BTreeInsert: PROC [
    dir: LONG POINTER TO DirectoryInternal.DirectoryDescriptor, name: LONG STRING, cap: File.Capability]
    RETURNS [ok, noRoom: BOOLEAN, ent: DirectoryInternal.DirectoryEntryHandle];
    
  DTDelete: PROC [pDT: DirectoryInternal.PDT, pDTNode: DirectoryInternal.PDTNode, name: LONG STRING]
    RETURNS [ok: BOOLEAN];
    
  DTFind: PROC [pDT: DirectoryInternal.PDT, pDTNode: DirectoryInternal.PDTNode, name: LONG STRING]
    RETURNS [DirectoryInternal.PDTNode];
    
  DTFirst: PROC [pDT: DirectoryInternal.PDT] RETURNS [DirectoryInternal.PDTNode];
  
  DTInsert: PROC [pDT: DirectoryInternal.PDT, pDTNode: DirectoryInternal.PDTNode, name: LONG STRING,
    cap: File.Capability] RETURNS [ok, noRoom: BOOLEAN];

  PDTNext: PROC [pDT: DirectoryInternal.PDT, pDTNode: DirectoryInternal.PDTNode]
    RETURNS [pNext: DirectoryInternal.PDTNode];

  DTMoveNode: PROC [pDT: DirectoryInternal.PDT, pDTNode1, pDTNode2: DirectoryInternal.PDTNode];
    
  MoveLongString: PROC [to, from: LONG STRING];
  
END.


LOG

Time: August 21, 1980  10:41 AM By: Marzullo	Action: Created File
Time: January 4, 1981  4:40 PM By: Keith  Action: Changed POINTERs to LONG POINTERs TO DirectoryDescriptors;  added DTMoveNode, PDTNext;  added mask parameter to BTreeGetNext