Category : Modula II Source Code
Archive   : STDLIB.ZIP
Filename : FILESYST.DEF

 
Output of file : FILESYST.DEF contained in archive : STDLIB.ZIP

DEFINITION MODULE FileSystem;

TYPE
(* These are DOS file attributes. This obviously needs thought as far
as other systems go. *)
FileAttrs = (ReadOnly,Hidden,System,VolLabel,Dir,Archive);

FileAttrSet = SET OF FileAttrs;


VAR FSResult:CARDINAL; (* Error code returned by last FileSystem operation *)


(* Find a file which matches the pattern in 'wild' and is either a normal
file, or which matches one of the attributes passed in 'Attrs'. Returns TRUE
if such a file exists in which case 'name' will contain the file. Returns
FALSE if not.
*)
PROCEDURE FindFirstFile(wild:ARRAY OF CHAR; Attrs:FileAttrSet;
VAR name:ARRAY OF CHAR):BOOLEAN;

(* FindFirstFile is called once to find the first file matching a pattern.
After that remaining files matching the pattern are found using this
procedure, which returns TRUE if another file exists.
*)
PROCEDURE FindNextFile(VAR name:ARRAY OF CHAR):BOOLEAN;

PROCEDURE RenameFile(oldname,newname:ARRAY OF CHAR);

PROCEDURE EraseFile(name:ARRAY OF CHAR);

(* get attributes of file. 'name' may include a complete path. *)
PROCEDURE GetFileAttributes(name:ARRAY OF CHAR; VAR attr:FileAttrSet);

(* set attributes of a file. 'name' may include the complete path *)
PROCEDURE SetFileAttributes(name:ARRAY OF CHAR; attr:FileAttrSet);

(* get a files size. 'name' may include the complete path. *)
PROCEDURE GetFileSize(name:ARRAY OF CHAR; VAR size:LONGCARD);

END FileSystem.



  3 Responses to “Category : Modula II Source Code
Archive   : STDLIB.ZIP
Filename : FILESYST.DEF

  1. Very nice! Thank you for this wonderful archive. I wonder why I found it only now. Long live the BBS file archives!

  2. This is so awesome! 😀 I’d be cool if you could download an entire archive of this at once, though.

  3. But one thing that puzzles me is the “mtswslnkmcjklsdlsbdmMICROSOFT” string. There is an article about it here. It is definitely worth a read: http://www.os2museum.com/wp/mtswslnk/