曲径通幽论坛

标题: opendir() [打印本页]

作者: beyes    时间: 2008-11-16 23:13
标题: opendir()
名称:
      opendir()-打开一个目录

包含头文件:

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

描述1:
    The opendir() function opens a directory stream corresponding to thedirectory name, and returns a pointer to the directory stream.  Thestream is positioned at the first entry in the directory.
( opendir 打开一个和目录名对应的一个目录流,并返回一个目录流的指针。这个流定位在目录的第一个入口处)


描述2:
   The opendir function opens a directory and establishes a directorystream. If successful, it returns a pointer to a DIR structure to beused for reading directory entries.
( opendir 打开一个文件并建立一个目录流。如果打开成功,返回一个指向 DIR 结构的指针,这个指针会被里用来对目录入口的读取 )
作者: beyes    时间: 2008-11-16 23:13
DIR 是一个结构,多个这样的结构构成一个目录流(directory stream);

在 DIR 中包含着 struct dirent 这样的结构---描述目录下文件的信息。




欢迎光临 曲径通幽论坛 (http://www.groad.net/bbs/) Powered by Discuz! X3.2