MODULEOSPOSIX EXPORTSOS ; IMPORT FS, File, OSError, OSErrorPosix; PROCEDUREIsDirectory (path: TEXT): BOOLEAN = VAR s: File.Status; BEGIN TRY s := FS.Status (path); RETURN (s.type = FS.DirectoryFileType); EXCEPT OSError.E => RETURN FALSE; END; END IsDirectory; PROCEDUREClose (f: File.T; modTime: LONGREAL; path: TEXT) RAISES {OSError.E} = BEGIN f.close (); SetModifiedTime (path, modTime); END Close; PROCEDURESetModifiedTime (path: TEXT; time: LONGREAL) RAISES {OSError.E} = BEGIN IF UTimes (path, time) < 0 THEN OSErrorPosix.Raise (); END; END SetModifiedTime; BEGIN END OSPOSIX.