FileProcs:
PUBLIC
TYPE =
RECORD [
GetClass: PROC [REF] RETURNS [ATOM],
SameFile: PROC [REF, REF] RETURNS [BOOL],
GetName: PROC [REF] RETURNS [Rope.ROPE, Rope.ROPE],
GetInfo: PROC [REF] RETURNS [CARDINAL, INT, INT, BasicTime.GMT, FS.Lock, FS.FileType],
SetPageCount: PROC [REF, INT],
SetByteCountAndCreatedTime: PROC [REF, INT, BasicTime.GMT],
Read: UNSAFE PROC [REF, INT, INT, LONG POINTER],
Write: PROC [REF, INT, INT, LONG POINTER],
Close: PROC [REF]
];
CreateFileProcs:
PUBLIC
PROC [
GetClass:
PROC [
REF]
RETURNS [
ATOM],
SameFile:
PROC [
REF,
REF]
RETURNS [
BOOL],
GetName:
PROC [
REF]
RETURNS [Rope.
ROPE, Rope.
ROPE],
GetInfo:
PROC [
REF]
RETURNS [
CARDINAL,
INT,
INT, BasicTime.
GMT,
FS.Lock,
FS.FileType],
SetPageCount:
PROC [
REF,
INT],
SetByteCountAndCreatedTime:
PROC [
REF,
INT, BasicTime.
GMT],
Read:
UNSAFE
PROC [
REF,
INT,
INT,
LONG
POINTER],
Write:
PROC [
REF,
INT,
INT,
LONG
POINTER],
Close:
PROC [
REF]
]
RETURNS [
REF FileProcs] = {
RETURN [ NEW [ FileProcs ← [GetClass, SameFile, GetName, GetInfo, SetPageCount, SetByteCountAndCreatedTime, Read, Write, Close] ] ];
};