GETDENTS
Section: ¸®´ª½º ÇÁ·Î±×·¡¸Ó ¸Þ´º¾ó (2)
Updated: 1995³â 7¿ù 22ÀÏ
Index
Return to Main Contents
À̸§
getdents - µð·ºÅ丮 ¿£Æ®¸®¸¦ °¡Á®¿Â´Ù.
»ç¿ë¹ý
#include <unistd.h>
#include <linux/types.h>
#include <linux/dirent.h>
#include <linux/unistd.h>
_syscall3(int, getdents, uint, fd, struct dirent *, dirp, uint, count);
int getdents(unsigned int fd, struct dirent *dirp, unsigned int count);
¼³¸í
getdents´Â
fd°¡
°¡¸®Å°´Â µð·ºÅ丮¿¡¼ ¿©·¯
dirent
±¸Á¶Ã¼À» Àоî¿Í
dirp°¡
°¡¸®Å°´Â ¸Þ¸ð¸® °ø°£¿¡ ÀúÀåÇÑ´Ù.
count
ÀÎÀÚ´Â ¸Þ¸ð¸® °ø°£ÀÇ Å©±âÀÌ´Ù.
dirent
±¸Á¶Ã¼´Â ´ÙÀ½°ú °°´Ù:
-
struct dirent
{
long d_ino; /* inode ¹øÈ£ */
off_t d_off; /* ´ÙÀ½ dirent¿¡ ´ëÇÑ ¿É¼Â */
unsigned short d_reclen; /* ÀÌ direntÀÇ ±æÀÌ */
char d_name [NAME_MAX+1]; /* (null·Î ³¡³ª´Â) ÆÄÀÏ À̸§ */
}
d_ino´Â
inode ¹øÈ£ÀÌ´Ù.
d_off´Â
ÇöÀç µð·ºÅ丮 ½ÃÀÛºÎÅÍ ´ÙÀ½
dirent
½ÃÀÛ ±îÁöÀÇ ¿É¼Â(offset)ÀÌ´Ù.
d_reclen´Â
ÀÌ
direntÀÇ
Àüü Å©±âÀÌ´Ù.
d_name´Â
null·Î ³¡³ª´Â ÆÄÀÏ À̸§ÀÌ´Ù.
ÀÌ ½Ã½ºÅÛ ÄÝÀº
readdir(2)¸¦
´ëüÇÑ´Ù.
¹Ýȯ°ª
¼º°ø½Ã, ÀÐÀº ¹ÙÀÌÆ®ÀÇ ¼ö°¡ ¸®ÅϵȴÙ.
µð·ºÅ丮ÀÇ ³¡¿¡¼, 0ÀÌ ¸®ÅϵȴÙ.
¿¡·¯½Ã, -1ÀÌ ¸®ÅϵǸç,
errno´Â
Àû´çÇÑ °ªÀ¸·Î ¼³Á¤µÈ´Ù.
¿¡·¯
- EBADF
-
À¯È¿ÇÏÁö ¾ÊÀº ÆÄÀÏ ±â¼úÀÚ
fd.
- EFAULT
-
ÀÎÀÚ°¡ È£ÃâÇÑ ÇÁ·Î¼¼½ºÀÇ ÁÖ¼Ò °ø°£À» ¹þ¾î³ °÷À» °¡¸®Å²´Ù.
- EINVAL
-
°á°ú ¹öÆÛ°¡ ³Ê¹« ÀÛ´Ù.
- ENOENT
-
±×·± µð·ºÅ丮°¡ ¾ø´Ù.
- ENOTDIR
-
ÆÄÀÏ ±â¼úÀÚ°¡ µð·ºÅ丮¸¦ ÂüÁ¶ÇÏ°í ÀÖÁö ¾Ê´Ù.
ȣȯ
SVr4, SVID. SVr4 ¹®¼¿¡¼´Â ENOLINK, EIO ¿¡·¯ »óÅ°¡ Ãß°¡µÇÀÖ´Ù.
°ü·Ã Ç׸ñ
readdir(2),
readdir(3)
¿ªÀÚ
Á¤°ÈÆ <skyeyes@soback.kornet.net>, 2000³â 5¿ù 2ÀÏ
Index
- À̸§
-
- »ç¿ë¹ý
-
- ¼³¸í
-
- ¹Ýȯ°ª
-
- ¿¡·¯
-
- ȣȯ
-
- °ü·Ã Ç׸ñ
-
- ¿ªÀÚ
-
This document was created by
man2html,
using the manual pages.
Time: 08:06:58 GMT, March 25, 2004