Overview  Index  Help 
Standard ML Basis Library

POSIX_FileSys


structure POSIX_FileSys =
struct
  structure S =
  struct
    type mode = flags
    datatype flags = MODE of word
    val fromWord
    val toWord
    val flags
    val anySet
    val allSet
    val irwxu
    val irusr
    val iwusr
    val ixusr
    val irwxg
    val irgrp
    val iwgrp
    val ixgrp
    val irwxo
    val iroth
    val iwoth
    val ixoth
    val isuid
    val isgid
  end
  structure O =
  struct
    datatype flags = OFL of word
    val fromWord
    val toWord
    val flags
    val anySet
    val allSet
    val append
    val dsync
    val excl
    val noctty
    val nonblock
    val rsync
    val sync
    val o_trunc
    val trunc
    val o_creat
    val crflags
  end
  structure ST =
  struct
    datatype stat =
             ST of
             {
               ftype : s_int,
               mode : S.mode,
               ino : ino,
               dev : dev,
               nlink : int,
               uid : uid,
               gid : gid,
               size : Position.int,
               atime : Time.time,
               mtime : Time.time,
               ctime : Time.time
             }
    val isDir
    val isChr
    val isBlk
    val isReg
    val isFIFO
    val isLink
    val isSock
    val mode
    val ino
    val dev
    val nlink
    val uid
    val gid
    val size
    val atime
    val mtime
    val ctime
  end
  type word = SysWord.word
  type s_int = SysInt.int
  type c_dirstream = Assembly.object
  type statrep =
       s_int *
       word *
       word *
       word *
       word *
       word *
       word *
       Position.int *
       Int32.int *
       Int32.int *
       Int32.int
  datatype uid = UID of word
  datatype gid = GID of word
  datatype file_desc = FD of {fd : s_int}
  datatype open_mode = O_RDONLY | O_WRONLY | O_RDWR
  datatype dirstream = DS of {dirStrm : c_dirstream, isOpen : bool ref}
  datatype dev = DEV of word
  datatype ino = INO of word
  datatype access_mode = A_READ | A_WRITE | A_EXEC
  val ++
  val &
  val cfun
  val osval
  val w_osval
  val intOf
  val fd
  val fdToWord
  val wordToFD
  val fdToIOD
  val iodToFD
  val o_rdonly
  val o_wronly
  val o_rdwr
  val omodeFromWord
  val omodeToWord
  val uidToWord
  val wordToUid
  val gidToWord
  val wordToGid
  val opendir'
  val readdir'
  val rewinddir'
  val closedir'
  val opendir
  val readdir
  val rewinddir
  val closedir
  val chdir
  val getcwd
  val stdin
  val stdout
  val stderr
  val openf'
  val openf
  val createf
  val creat
  val umask'
  val umask
  val link'
  val link
  val rename'
  val rename
  val symlink'
  val symlink
  val mkdir'
  val mkdir
  val mkfifo'
  val mkfifo
  val unlink
  val rmdir
  val readlink
  val ftruncate'
  val ftruncate
  val devToWord
  val wordToDev
  val inoToWord
  val wordToIno
  val mkStat
  val stat'
  val lstat'
  val fstat'
  val stat
  val lstat
  val fstat
  val a_read
  val a_write
  val a_exec
  val a_file
  val amodeToWord
  val access'
  val access
  val chmod'
  val chmod
  val fchmod'
  val fchmod
  val chown'
  val chown
  val fchown'
  val fchown
  val utime'
  val utime
  val pathconf
  val fpathconf'
  val fpathconf
end

 
Type detail

word

type word = SysWord.word


s_int

type s_int = SysInt.int


c_dirstream

type c_dirstream = Assembly.object


statrep

type statrep =
     s_int *
     word *
     word *
     word *
     word *
     word *
     word *
     Position.int *
     Int32.int *
     Int32.int *
     Int32.int

 
Datatype detail

uid

datatype uid = UID of word


gid

datatype gid = GID of word


file_desc

datatype file_desc = FD of {fd : s_int}


open_mode

datatype open_mode = O_RDONLY | O_WRONLY | O_RDWR


dirstream

datatype dirstream = DS of {dirStrm : c_dirstream, isOpen : bool ref}


dev

datatype dev = DEV of word


ino

datatype ino = INO of word


access_mode

datatype access_mode = A_READ | A_WRITE | A_EXEC

 
DataConstructor detail

UID

constructor UID : word -> uid


GID

constructor GID : word -> gid


FD

constructor FD : {fd : s_int} -> file_desc


O_RDONLY

constructor O_RDONLY : open_mode


O_WRONLY

constructor O_WRONLY : open_mode


O_RDWR

constructor O_RDWR : open_mode


DS

constructor DS : {dirStrm : c_dirstream, isOpen : bool ref} -> dirstream


DEV

constructor DEV : word -> dev


INO

constructor INO : word -> ino


A_READ

constructor A_READ : access_mode


A_WRITE

constructor A_WRITE : access_mode


A_EXEC

constructor A_EXEC : access_mode

 
Value detail

++

val ++


&

val &


cfun

val cfun


osval

val osval


w_osval

val w_osval


intOf

val intOf


fd

val fd


fdToWord

val fdToWord


wordToFD

val wordToFD


fdToIOD

val fdToIOD


iodToFD

val iodToFD


o_rdonly

val o_rdonly


o_wronly

val o_wronly


o_rdwr

val o_rdwr


omodeFromWord

val omodeFromWord


omodeToWord

val omodeToWord


uidToWord

val uidToWord


wordToUid

val wordToUid


gidToWord

val gidToWord


wordToGid

val wordToGid


opendir'

val opendir'


readdir'

val readdir'


rewinddir'

val rewinddir'


closedir'

val closedir'


opendir

val opendir


readdir

val readdir


rewinddir

val rewinddir


closedir

val closedir


chdir

val chdir


getcwd

val getcwd


stdin

val stdin


stdout

val stdout


stderr

val stderr


openf'

val openf'


openf

val openf


createf

val createf


creat

val creat


umask'

val umask'


umask

val umask


link'

val link'


link

val link


rename'

val rename'


rename

val rename


symlink'

val symlink'


symlink

val symlink


mkdir'

val mkdir'


mkdir

val mkdir


mkfifo'

val mkfifo'


mkfifo

val mkfifo


unlink

val unlink


rmdir

val rmdir


readlink

val readlink


ftruncate'

val ftruncate'


ftruncate

val ftruncate


devToWord

val devToWord


wordToDev

val wordToDev


inoToWord

val inoToWord


wordToIno

val wordToIno


mkStat

val mkStat


stat'

val stat'


lstat'

val lstat'


fstat'

val fstat'


stat

val stat


lstat

val lstat


fstat

val fstat


a_read

val a_read


a_write

val a_write


a_exec

val a_exec


a_file

val a_file


amodeToWord

val amodeToWord


access'

val access'


access

val access


chmod'

val chmod'


chmod

val chmod


fchmod'

val fchmod'


fchmod

val fchmod


chown'

val chown'


chown

val chown


fchown'

val fchown'


fchown

val fchown


utime'

val utime'


utime

val utime


pathconf

val pathconf


fpathconf'

val fpathconf'


fpathconf

val fpathconf

 


Overview  Index  Help 
Standard ML Basis Library

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 © 2003 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).