previous | start | next

Opening a File with Linux I/O open

Open a file for reading

        int fd;
        fd = open("foo.txt", O_RDONLY, 0);
     

Open an existing file for writing (current data is first truncated to 0 bytes) with permissions

        int fd;
        fd = open("foo.txt", O_WRONLY, 0666);
     


previous | start | next