int read(int handle, void *buf, int count);
從 handle 讀取最多 count 位元組至 buf。傳回實際讀取位元組數,0 表示檔案結尾,-1 表示錯誤。
int write(int handle, const void *buf, int count);
將 buf 的 count 位元組寫入 handle。傳回實際寫入位元組數。
long lseek(int handle, long offset, int fromwhere);
功能同 fseek()。fromwhere:0=檔案開頭,1=目前位置,2=檔案結尾。傳回新位置(相對檔案開頭的位移),錯誤傳回 -1L。
long tell(int handle);
傳回目前檔案位置指標(位元組偏移量),功能同 ftell()。
這組函數適合需要精確控制檔案位置、高效能或系統層級程式設計的場合。