DEFINITION MODULE dir;

FROM IOFform IMPORT jNode, slotNumber;

FROM UDMdefs IMPORT

	Dentry;

FROM extio IMPORT extentDescriptor;

FROM flio IMPORT

	fileDescriptor;

EXPORT QUALIFIED 
	isdir, split, seekdir, getdir, indir, setdir,
	nextdir, finddir, lookup;


PROCEDURE isdir(
	jnode:          jNode
):			BOOLEAN;

PROCEDURE split(
	name:           ARRAY OF CHAR;
	VAR nam1:       ARRAY OF CHAR;
	VAR nam2:       ARRAY OF CHAR);

PROCEDURE seekdir(
	VAR df:		fileDescriptor;
	dix:		CARDINAL
);

PROCEDURE getdir(
	VAR df:		fileDescriptor;
	dix:		CARDINAL;
	VAR dent:	Dentry
):			BOOLEAN;

PROCEDURE indir(
	VAR df:		fileDescriptor;
	name:           ARRAY OF CHAR;
	VAR dix:	CARDINAL
);

PROCEDURE setdir(
	VAR df:		fileDescriptor;
	dx:		CARDINAL;
	dent:		Dentry
);

PROCEDURE nextdir(
	VAR df:		fileDescriptor;
	VAR dx:		CARDINAL
);

PROCEDURE finddir(
	ex:             extentDescriptor;
	dj:             slotNumber;
	name:           ARRAY OF CHAR;
	VAR jn:         slotNumber
):                      BOOLEAN;

PROCEDURE lookup(
	fullpathname:   ARRAY OF CHAR;
	ex:             extentDescriptor;
	j0:             slotNumber;
	VAR pj:         slotNumber;
	VAR jn:         slotNumber;
	VAR leaf:       ARRAY OF CHAR
):                      BOOLEAN;


END dir.

