alice
library
manual.

Alice Project

The OS.FileSys structure


________ Synopsis ____________________________________________________

    signature OS_FILE_SYS
    structure FileSys : OS_FILE_SYS
  

An extended version of the Standard ML Basis' OS.FileSys structure.

See also: OS


________ Import ______________________________________________________

Imported implicitly.


________ Interface ___________________________________________________

    signature OS_FILE_SYS =
    sig
	type dirstream
	eqtype file_id
	datatype access_mode = A_READ | A_WRITE | A_EXEC

	val openDir :   string -> dirstream
	val readDir :   dirstream -> string option
	val rewindDir : dirstream -> unit
	val closeDir :  dirstream -> unit

	val chDir :     string -> unit
	val getDir :    unit -> string
	val mkDir :     string -> unit
	val rmDir :     string -> unit
	val isDir :     string -> bool

	val fileSize :  string -> Position.int
	val modTime :   string -> Time.time

	val remove :    string -> unit

	val tmpName :   unit -> string

	val getHomeDir : unit -> string
	val getApplicationConfigDir : string -> string
    end
  

________ Description _________________________________________________

Items not described here are as in the Standard ML Basis' OS.FileSys structure.

Limitations: The following functions are currently missing:

getHomeDir ()

Returns the path of the home directory of the current user. Under Windows, it typically maps to the language-specific equivalent of "c:/Documents And Settings/user/My Documents".

getApplicationConfigDir name

Returns the canonical directory path where an Alice ML application of Name name can store its (user-specific) configurations. This is regardless of whether the directory actually exists, i.e. an application has to create it itself.

Under Unix-like systems, the delivered path will typically be $HOME/.alice/name, under Windows it is usually something like "c:/Documents And Settings/user/Application Data/Alice/name".



last modified 2007/Mar/30 17:10