OSDir

Module for operating on OS directories

Types

Dir* = RECORD (OSHost.DirEntry) END;

Procedures

Dir.Open

Open file/directory listing

PROCEDURE (VAR d : Dir) Open*(name- : ARRAY OF CHAR);

Dir.Close

Close file/directory listing

PROCEDURE (VAR d : Dir) Close*();

Dir.Next

Return FALSE when end of file/directory listing is reached

PROCEDURE (VAR d : Dir) Next*(): BOOLEAN;

Dir.Name

Get current entry path name

PROCEDURE (VAR d : Dir) Name*(VAR name : String.STRING);

Dir.IsDir

Return TRUE if current entry is a directory

PROCEDURE (VAR d : Dir) IsDir*(): BOOLEAN;

Dir.IsFile

Return TRUE if current entry is a file

PROCEDURE (VAR d : Dir) IsFile*(): BOOLEAN;

Current

Get current directory name

PROCEDURE Current*(VAR name : String.STRING);

SetCurrent

Set current directory name

PROCEDURE SetCurrent*(name- : ARRAY OF CHAR): BOOLEAN;

Create

Try to create directory. Return TRUE on success

PROCEDURE Create*(name-: ARRAY OF CHAR): BOOLEAN;

Delete

Try to delete directory. Return TRUE on success

PROCEDURE Delete*(name-: ARRAY OF CHAR): BOOLEAN;