getdents man page on OSF1

Man page or keyword search:  
man Server   12896 pages
apropos Keyword Search (all sections)
Output format
OSF1 logo
[printable version]

getdents(3)							   getdents(3)

NAME
       getdents - Reads directory entries and put in a file system independent
       format

SYNOPSIS
       #include <dirent.h> #include <errno.h>

       long getdents(
	       int filedes, struct dirent *buf, size_t,
	       nbyte );

LIBRARY
       SVR4 Library (libsvr4)

PARAMETERS
       Specifies the file descriptor associated with the directory.  Specifies
       a  directory  entry  structure, which is of variable length.  Specifies
       the data buffer.	 Specifies the maximum amount of  data	to  be	trans‐
       ferred  in  bytes  and  is an unsigned long.  Specifies the size of the
       data buffer.

DESCRIPTION
       The getdents() function attempts to read nbyte bytes from the directory
       associated  with	 fildes	 and to format them as file system independent
       directory entries in the buffer pointed to by buf.  Since the file sys‐
       tem independent directory entries are of variable length, in most cases
       the actual number of bytes returned will be strictly less than nbyte.

       The fildes file descriptor is obtained from an open(2) or dup(2) system
       call.

       The  file system independent directory entry is specified by the dirent
       structure.

       On devices capable of seeking, getdents() starts at a position  in  the
       file    given  by the file pointer associated with fildes.  Upon return
       from getdents() function, the file pointer is incremented to  point  to
       the next directory entry.

       This  system  call was developed in order to implement the readdir rou‐
       tine and should not be used for other purposes.

NOTES
       Version supports the [Tru64 UNIX]  definition of the dirent  structure,
       which  is  different  from the SVR4 definition.	Some of the files that
       are referenced by absolute path in the System V Environment for	[Tru64
       UNIX]	 reference   pages   actually	may  be	 located  relative  to
       /usr/opt/svr4.

RETURN VALUES
       If the getdents() function fails a value of -1 is returned,  and	 errno
       is  set as shown in the ERRORS section. On success the getdents() func‐
       tion returns the number of bytes read.

ERRORS
       The fildes descriptor is not a valid file descriptor open for  reading.
       The buffer buf points to a location outside the allocated address space
       of the process.	The nbyte size is not large enough for	one  directory
       entry.	The current file pointer for the directory is not located at a
       valid entry.  The fildes descriptor is not a directory.	An  I/O	 error
       occurred while accessing the file system.

SEE ALSO
       Functions: getdirentries(2), open(2), lseek(2)

								   getdents(3)
[top]
                             _         _         _ 
                            | |       | |       | |     
                            | |       | |       | |     
                         __ | | __ __ | | __ __ | | __  
                         \ \| |/ / \ \| |/ / \ \| |/ /  
                          \ \ / /   \ \ / /   \ \ / /   
                           \   /     \   /     \   /    
                            \_/       \_/       \_/ 
More information is available in HTML format for server OSF1

List of man pages available for OSF1

Copyright (c) for man pages and the logo by the respective OS vendor.

For those who want to learn more, the polarhome community provides shell access and support.

[legal] [privacy] [GNU] [policy] [cookies] [netiquette] [sponsors] [FAQ]
Tweet
Polarhome, production since 1999.
Member of Polarhome portal.
Based on Fawad Halim's script.
....................................................................
Vote for polarhome
Free Shell Accounts :: the biggest list on the net