Review
Contents
23. Review#
23.1. Common File System System Calls#
Function |
Reference |
Brief Description |
---|---|---|
open() |
Creates a file descriptor for file I/O |
|
close() |
Closes a file descriptor |
|
read() |
Copies bytes from file descriptor to buffer |
|
write() |
Copies bytes from buffer to file descriptor |
|
lseek() |
Sets the I/O offset in an open file descriptor |
|
rename() |
Renames a file/directory |
|
link() |
Adds a hard link to a file |
|
unlink() |
Decrement file reference count |
|
opendir(), readdir(), dirent() |
Enumerate names in a directory |
|
stat(), fstat() |
Returns file information |
|
opendir(), rmdir() |
Create/remove empty directory |