OS
structure
signature OS
structure OS
:> OS
The OS
structure is a container for a collection of structures for interacting with the operating system's file system, directory paths, processes, and I/O subsystem. The types and functions provided by the OS
substructures are meant to present a model for handling these resources that is largely independent of the operating system.
The structure also declares the SysErr
exception used to report operating system error conditions.
structure FileSys : OS_FILE_SYS
structure IO : OS_IO
structure Path : OS_PATH
structure Process : OS_PROCESS
eqtype syserror
exception SysErr of string * syserror option
val errorMsg : syserror -> string
val errorName : syserror -> string
val syserror : string -> syserror option
structure FileSys : OS_FILE_SYS
structure IO : OS_IO
structure Path : OS_PATH
structure Process : OS_PROCESS
eqtype syserror
SysErr
exception.
exception SysErr of string * syserror option
SysErr
exception has the form SysErr(s,SOME
e)
, then we have errorMsg
e = s
. System errors that do not have corresponding syserror
value will result in SysErr
being raised with a second argument of NONE
.
errorMsg err
errorName err
syserror s
syserror
type, and their operating system dependent string names. The primary purpose of these functions is to provide a mechanism for dealing with error codes that might not have symbolic names defined for them in the operating system specific modules. The former function returns a unique name used for the syserror
value, while the latter returns the syserror
whose name is s, if it exists. If e is a syserror
, then it should be the case that
SOME e = syserror(errorName e)
OS.FileSys
,OS.IO
,OS.Path
,OS.Process
Generated April 12, 2004
Last Modified April 19, 1996
Comments to John Reppy.
This document may be distributed freely over the internet as long as the copyright notice and license terms below are prominently displayed within every machine-readable copy.
Copyright © 2004 AT&T and Lucent Technologies. All rights reserved.
Permission is granted for internet users to make one paper copy for their
own personal use. Further hardcopy reproduction is strictly prohibited.
Permission to distribute the HTML document electronically on any medium
other than the internet must be requested from the copyright holders by
contacting the editors.
Printed versions of the SML Basis Manual are available from Cambridge
University Press.
To order, please visit
www.cup.org (North America) or
www.cup.cam.ac.uk (outside North America). |