File Access

┌─────────────────────────┬──────────────┬─────────────────────────┬───────────┐
│ Function │ Header File │ Link to Function │ Descriptio│
├─────────────────────────┼──────────────┼─────────────────────────┼───────────┤
│ access │ "io.h" │ access │ Deter- │
│ │ │ │ mines │
│ │ │ │ whether │
│ │ │ │ the given │
│ │ │ │ file │
│ │ │ │ exists │
│ │ │ │ and │
│ │ │ │ whether │
│ │ │ │ you can │
│ │ │ │ gain │
│ │ │ │ access to │
│ │ │ │ it. │
├─────────────────────────┼──────────────┼─────────────────────────┼───────────┤
│ chmod │ "io.h" │ chmod │ Changes │
│ │ │ │ the per- │
│ │ │ │ mission │
│ │ │ │ setting │
│ │ │ │ of a │
│ │ │ │ file. │
├─────────────────────────┼──────────────┼─────────────────────────┼───────────┤
│ close │ "io.h" │ close │ Closes a │
│ │ │ │ file │
│ │ │ │ associ- │
│ │ │ │ ated with │
│ │ │ │ the │
│ │ │ │ handle. │
├─────────────────────────┼──────────────┼─────────────────────────┼───────────┤
│ creat │ "io.h" │ creat │ Creates a │
│ │ │ │ new file │
│ │ │ │ or opens │
│ │ │ │ and trun- │
│ │ │ │ cates an │
│ │ │ │ existing │
│ │ │ │ file. │
├─────────────────────────┼──────────────┼─────────────────────────┼───────────┤
│ dup │ "io.h" │ dup │ Associ- │
│ │ │ │ ates a │
│ │ │ │ second │
│ │ │ │ file │
│ │ │ │ handle │
│ │ │ │ with an │
│ │ │ │ open │
│ │ │ │ file. │
├─────────────────────────┼──────────────┼─────────────────────────┼───────────┤
│ dup2 │ "io.h" │ dup2 │ Associ- │
│ │ │ │ ates a │
│ │ │ │ second │
│ │ │ │ file │
│ │ │ │ handle, │
│ │ │ │ with pos- │
│ │ │ │ sibly │
│ │ │ │ different │
│ │ │ │ attri- │
│ │ │ │ butes, │
│ │ │ │ with an │
│ │ │ │ open │
│ │ │ │ file. │
├─────────────────────────┼──────────────┼─────────────────────────┼───────────┤
│ isatty │ "io.h" │ isatty │ Deter- │
│ │ │ │ mines │
│ │ │ │ whether │
│ │ │ │ the │
│ │ │ │ handle is │
│ │ │ │ associ- │
│ │ │ │ ated with │
│ │ │ │ a char- │
│ │ │ │ acter │
│ │ │ │ device. │
├─────────────────────────┼──────────────┼─────────────────────────┼───────────┤
│ open │ "io.h" │ open │ Opens a │
│ │ │ │ file and │
│ │ │ │ prepares │
│ │ │ │ it for │
│ │ │ │ subse- │
│ │ │ │ quent │
│ │ │ │ reading │
│ │ │ │ and │
│ │ │ │ writing. │
└─────────────────────────┴──────────────┴─────────────────────────┴───────────┘
┌─────────────────────────┬──────────────┬─────────────────────────┬───────────┐
│ _sopen │ "io.h" │ _sopen │ Opens a │
│ │ │ │ file and │
│ │ │ │ prepares │
│ │ │ │ it for │
│ │ │ │ subse- │
│ │ │ │ quent │
│ │ │ │ shared │
│ │ │ │ reading │
│ │ │ │ or │
│ │ │ │ writing. │
└─────────────────────────┴──────────────┴─────────────────────────┴───────────┘


[Back: File Positioning]
[Next: File Operations]