This wiki is being migrated to

User Tools

Site Tools


Low level File Operations (fnctl.h)

Header {z88dk}/include/fcntl.h
Source {z88dk}/libsrc/fcntl
Include #include <fnctl.h>
Linking Platform specific
Compile n/a
Comments These library functions are compiled as part of each target’s implicit library.

These functions implement low level file operations and need to be implemented for each target. Some platforms (for example the ZX Spectrum) have several implementations for different disc systems. A dummy version to satisfy linking requirements is within the ndos library which is linked by default on platforms without file support.

Standard Functions

int open(char *name, int flags, mode_t mode)

int creat(char *name, mode_t mode)

int close(int fd)

size_t read(int fd, void *ptr, size_t len)

size_t write(int fd, void *ptr, size_t len)

long lseek(int fd,long posn, int whence)

long tell(int fd)

int readbyte(int fd)

int writebyte(int fd, int c)

Other Functions

int mkdir(char *dir, int mode)

char *getcwd(char *buf, size_t maxlen)

int rmdir(char *dir)

Remove a directory (Sprinter only).

char *getwd(char *buf)

(Sprinter only).

library/fcntl.txt · Last modified: 2017/03/24 08:16 (external edit)