How do you push a block of text in C to make space and write in a file using low level I/O?

53 views Asked by At

So I have to write in a file that already has text in it , using Low Level I/O, but I have to write in the middle of that text so I need to push that text and make space, same strategy for deletion, but I don't have an idea on how to do it . The functions I should use are :

ssize_t read(int fd, void *buf, size_t count); 
ssize_t write(int fd, const char *buf, size_t count);
int close( int handle );
int open(const char *pathname, int flags, mode_t mode);
off_t lseek(int fildes, off_t offset, int whence);

Thank you.

0

There are 0 answers