Idris2Doc : System.Linux.File

System.Linux.File

(source)

Definitions

interfaceFileDesc : Type->Type
Parameters: a
Methods:
fileDesc : a->Bits32

Implementations:
FileDescEventFD
FileDescBits32
FileDescStdFile
fileDesc : FileDesca=>a->Bits32
Totality: total
Visibility: public export
dataReadRes : Type
  Result of reading from a file descriptor

Totality: total
Visibility: public export
Constructors:
EOF : ReadRes
  End of file has been reached
Again : ReadRes
  This occurs when reading from a file descriptor in non-blocking mode
and there is currently no data ready.
Bytes : (n : Nat) ->IBuffern->ReadRes
  The given numbers have been read into an immutable buffer
Err : EpollErr->ReadRes
  An error occured
close : FileDesca=>a->PrimIO ()
  Close a file descriptor.

Totality: total
Visibility: export
read : FileDesca=>a->Buffer->Nat->Nat->PrimIO (EitherEpollErrNat)
  Low-level reading of at most `max` bytes from a file into a buffer
starting at buffer offset `offset`.

See `readBytes` for a higher-level function that allocates a new buffer and
correctly interprets the result.

Totality: total
Visibility: export
write : FileDesca=>a->Buffer->Nat->Nat->PrimIO (EitherEpollErrNat)
Totality: total
Visibility: export
readBytes : FileDesca=>a->Nat->PrimIOReadRes
  A higher-level alternative to `read`: It allocates a new buffer of the
given size and returns it wrapped in a `ReadRes`.

Use `read` if you want to avoid allocating a new buffer for every
data package.

Totality: total
Visibility: export
setNonBlocking : FileDesca=>a->PrimIO ()
  Changes a file descriptor's mode to `O_NONBLOCK`.

This will not block when trying to read from a stream such as a pipe, socket, or
stdin. Instead, `readBytes` will return `Again` in case no data is currently
available. Use this in combination with `EPOLLET` to keep reading from a data
source until it is temporarily exhausted.

Totality: total
Visibility: export
dataStdFile : Type
Totality: total
Visibility: public export
Constructors:
StdIn : StdFile
StdOut : StdFile
StdErr : StdFile

Hints:
EqStdFile
FileDescStdFile
FiniteStdFile
OrdStdFile
ShowStdFile