Server for Information Technologies ������ ��������������
������� �������������� ����������
(095) 932-9212, 932-9213, 939-0783
E-mail: [email protected]
������ �������� ����(!) ������������� ���������� CIT Forum CD-ROM

DIRENT(3)

��������
dirent - ������� ��������� ��������, ����������� �� �������� �������

���������

	#include <sys/types.h>
	#include <sys/dirent.h>

��������
��������� �������� ������� ����� ����� ��������� ������� ��������� ���������. ��������� dirent ���������� ��������� ��������, ����������� �� �������� �������, ������� �������� ����������, ����� ��� ������� �������� ��������� � ��������� ����� �������� ������. ����� ���� �������� ������������ � ���������� ���������� ������ getdents(2).

��������� dirent ���������� ����.

	struct dirent {
	             long           d_ino;
	             off_t          d_off;
	             unsigned short d_reclen;
	             char           d_name[1];
	            };
����� d_ino - ��� �����, ���������� ��� ������� ����� �������� �������. ���� d_off �������� �������� ���� ��������� �������� � �������������� �������� �������� �������. ���� d_name �������� ������ ����������� �������, ������� ��� ���� ��������� ��������. ��� ��� ����������� ����� � ����� ��������� ����� ������� MAXNAMLEN ��������. ��� ��������� ��������� ���������, ����������� �� �������� ������� � ���������� ������������� � ���������� ������. �������� d_reclen ������ ����� ������ ���� ���������. ��� ����� ������������ ����������� ������ ����� ������� � ��������� �����������, ��� ��� ��������� ��������� ����������� �� ������� �������� ����.

�����

	/usr/include/sys/dirent.h

��. �����
getdents(2)
Comments: [email protected]
Designed by Andrey Novikov
Copyright © CIT