|
|
1.1 ! root 1: .TH DIRREAD 2 ! 2: .CT 2 file_io dirs ! 3: .SH NAME ! 4: dirread \(mi read from directory, hiding format ! 5: .SH SYNOPSIS ! 6: .nf ! 7: .B int dirread(fildes, buffer, nbytes) ! 8: .B char *buffer; ! 9: .fi ! 10: .SH DESCRIPTION ! 11: .I Dirread ! 12: reads at most ! 13: .I nbytes ! 14: bytes of directory information ! 15: from the file pointer location ! 16: in the directory associated with ! 17: .I fildes ! 18: into memory at ! 19: .IR buffer . ! 20: The information is converted into a canonical form, ! 21: independent of the format used by the file system in which ! 22: the directory resides. ! 23: .PP ! 24: Each canonicalized entry consists of a decimal ASCII inode number, ! 25: a tab character, ! 26: a file name, ! 27: and an ASCII NUL. ! 28: .I Buffer ! 29: is filled with as many entries ! 30: as will fit; ! 31: the number of bytes used is returned. ! 32: 0 is returned when there are no more entries. ! 33: .PP ! 34: The file pointer is advanced by ! 35: the number of bytes passed over in the directory, ! 36: not the number of bytes placed in ! 37: .IR buffer . ! 38: Ask ! 39: .I lseek ! 40: for the new pointer; ! 41: don't try to compute it. ! 42: .SH "SEE ALSO" ! 43: .IR open (2), ! 44: .IR read (2), ! 45: .IR directory (3), ! 46: .IR dir (5) ! 47: .SH DIAGNOSTICS ! 48: .BR EBADF , ! 49: .BR ENOSPC ! 50: (buffer too small), ! 51: .BR ENOTDIR , ! 52: .BR EFAULT , ! 53: .B EINVAL ! 54: .SH BUGS ! 55: Not all file system types ! 56: support ! 57: .IR dirread . ! 58: The routines in ! 59: .IR directory (3) ! 60: know how to cope. ! 61: .br ! 62: Seeking in directories is dangerous, ! 63: because the contents often change under foot.
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.