Query: dirread
OS: plan9
Section: 2
Format: Original Unix Latex Style Formatted with HTML and a Horizontal Scroll Bar
DIRREAD(2) System Calls Manual DIRREAD(2)NAMEdirread - read directorySYNOPSIS#include <u.h> #include <libc.h> int dirread(int fd, Dir *buf, long nbytes)DESCRIPTIONThe data returned by a read(2) on a directory is a set of complete directory entries in a machine-independent format, exactly equivalent to the result of a stat(2) on each file or subdirectory in the directory. Dirread decodes the directory entries into a machine-dependent form. It reads from fd and unpacks the data into Dir structures in buf (see stat(2) for the layout of a Dir). Nbytes is the size of buf; it should be a multiple of sizeof(Dir). Directory entries have length DIRLEN (defined in <libc.h>) in machine-independent form. A suc- cessful read of a directory always returns a multiple of DIRLEN; dirread always returns a multiple of sizeof(Dir). Dirread returns the number of bytes filled in buf; the number returned may be less than the number requested. The file offset is advanced by the number of bytes actually read.SOURCE/sys/src/libc/9sys/dirread.cSEE ALSOintro(2), open(2), read(2)DIAGNOSTICSSets errstr. DIRREAD(2)
Related Man Pages |
---|
ost_dir(3) - debian |
getdirentries(2) - osf1 |
io::dir5.18(3pm) - mojave |
io::dir(3pm) - osx |
io::dir(3perl) - debian |
Similar Topics in the Unix Linux Community |
---|
Root Dir |
-d option not working... |
Copy single file to multiple directories |
Error in remote script |
Replace Filename and text inside of directory |