-- FileFilter.mesa  last edit: Bruce  July 2, 1980  6:07 PM

DIRECTORY
  DebugOps USING [CacheNewFile],
  SegmentDefs USING [AccessOptions, DefaultAccess, DefaultVersion, FileHandle, VersionOptions],
  StreamDefs USING [CreateByteStream, CreateWordStream, DiskHandle];

FileFilter: PROGRAM
  IMPORTS DebugOps, str: StreamDefs
  EXPORTS SegmentDefs, StreamDefs =
  BEGIN OPEN DebugOps;

  NewFile: PUBLIC PROC [name: STRING,
      access: SegmentDefs.AccessOptions ← SegmentDefs.DefaultAccess,
      version: SegmentDefs.VersionOptions ← SegmentDefs.DefaultVersion]
    RETURNS [SegmentDefs.FileHandle] =
    BEGIN RETURN[CacheNewFile[name,access,version]] END;

  NewByteStream: PUBLIC PROC [name: STRING, access: SegmentDefs.AccessOptions] 
      RETURNS [StreamDefs.DiskHandle] =
    BEGIN RETURN[str.CreateByteStream[CacheNewFile[name,access],access]] END;

  NewWordStream: PUBLIC PROC [name: STRING, access: SegmentDefs.AccessOptions] 
      RETURNS [StreamDefs.DiskHandle] =
    BEGIN RETURN[str.CreateWordStream[CacheNewFile[name,access],access]] END;

  END.