huckleberry- Haskell IOT on Intel Edison and other Linux computers.

Safe HaskellNone




type FilePath = String Source #

File and directory names are values of type String

type FileDescriptor = Int Source #

File descriptor numbers are values of type Int

fdOpen :: FilePath -> IOMode -> IO FileDescriptor Source #

Computation fdOpen file mode allocates and returns a new, open descriptor to manage the file file. It manages input if mode is ReadMode, output if mode is WriteMode, and both input and output if mode is ReadWriteMode.

fdClose :: FileDescriptor -> IO () Source #

Computation fdClose fd makes descriptor fd closed.

fdPutBuf :: FileDescriptor -> Ptr a -> Int -> IO () Source #

fdPutBuf fd buf count writes count 8-bit bytes from the buffer buf to the descriptor fd.

fdGetBuf :: FileDescriptor -> Ptr a -> Int -> IO () Source #

fdGetBuf fd buf count reads data from the descriptor fd into the buffer buf until either EOF is reached or count 8-bit bytes have been read.