dos_compilers/Logitech Modula-2 v1/DISKDIRE.DEF

76 lines
2.4 KiB
Plaintext
Raw Normal View History

2024-07-01 00:16:10 +02:00
DEFINITION MODULE DiskDirectory;
(*
Interface to directory functions of the underlying OS
Derived from the Lilith Modula-2 system developed by the
group of Prof. N. Wirth at ETH Zurich, Switzerland.
*)
EXPORT QUALIFIED
CurrentDrive, SelectDrive,
CurrentDirectory, ChangeDirectory,
MakeDir, RemoveDir,
ResetDiskSys, ResetDrive;
PROCEDURE CurrentDrive (VAR drive: CHAR);
(*- Returns the current default drive.
out: drive the default drive, given in character format.
*)
PROCEDURE SelectDrive (drive: CHAR; VAR done: BOOLEAN);
(*- Set default drive.
in: drive name of drive to make default, specified in char format.
out: done TRUE if operation was successful.
The default drive will be used by all routines referring to DK: .
*)
PROCEDURE CurrentDirectory (drive: CHAR; VAR dir: ARRAY OF CHAR);
(*- Gets the current directory for the specified drive.
in: drive 0C for the current drive, 1C for drive "A", etc.
out: dir current directory for that drive.
Under DOS 1.1, dir[0] will be set to nul (0C).
*)
PROCEDURE ChangeDirectory (dir: ARRAY OF CHAR; VAR done: BOOLEAN);
(*- Set the current directory
in: dir drive and directory path name.
out: done TRUE if successful; FALSE if the directory does not exist.
Under DOS 1.1, this function has no effect and 'done' is FALSE.
*)
PROCEDURE MakeDir (dir: ARRAY OF CHAR; VAR done: BOOLEAN);
(*- Create a sub-directory
in: dir drive, optional pathname and name of sub-directory to create.
out: done TRUE if successful; FALSE if path or drive does not exist.
Under DOS 1.1, this function has no effect and 'done' is FALSE.
*)
PROCEDURE RemoveDir (dir: ARRAY OF CHAR; VAR done: BOOLEAN);
(*- Remove a directory
in: dir drive and name of the sub-directory to remove.
out: done: TRUE if successful; FALSE if directory does not exist.
The specified directory must be empty or the procedure returns FALSE.
Under DOS 1.1, this function has no effect and 'done' is FALSE.
*)
PROCEDURE ResetDiskSys;
(*- MS-DOS disk reset
*)
PROCEDURE ResetDrive (d: CHAR): CARDINAL;
(* This function has no effect and always returns 255. It is part of this
definition module for reasons of compatibility with other implementations.
*)
END DiskDirectory.
It is part of this
definition module for reasons of compatibil