In this task, the job is to create a new empty file called "output.txt" of size 0 bytes
and an empty directory called "docs". This should be done twice: once "here", i.e. in the current working directory and once in the filesystem root.

MODULE FileCreation EXPORTS Main;
 
IMPORT FS, File, OSError, IO, Stdio;
 
VAR file: File.T;
 
BEGIN
  TRY
    file := FS.OpenFile("output.txt");
    file.close();
    FS.CreateDirectory("docs");
    file := FS.OpenFile("/output.txt");
    file.close();
    FS.CreateDirectory("/docs");
  EXCEPT
  | OSError.E => IO.Put("Error creating file or directory.\n", Stdio.stderr);
  END;
END FileCreation.