JM プロジェクトは、主に Linux 関連のマニュアルページの日本語ページを翻訳・公開しています。
... list , int (* filter )(const struct dirent *), int (* compar )(const struct dirent **, const struct dirent **)); int alphasort(const struct dirent ** a , const struc ... t dirent ** b ); int versionsort(const struct dirent ** a , const struct dirent ** b ); #include < fcntl.h > /* AT_* 定数の定義 */ ... #include < dirent.h > int scandirat(int dirfd , const char * dirp , struct dirent *** namelist , int (* filter )(const struct dirent *), int ... ... list , int (* filter )(const struct dirent *), int (* compar )(const struct dirent **, const struct dirent **)); int alphasort(const struct dirent ** a , const struc ... t dirent ** b ); int versionsort(const struct dirent ** a , const struct dirent ** b ); #include < fcntl.h > /* AT_* 定数の定義 */ ... #include < dirent.h > int scandirat(int dirfd , const char * dirp , struct dirent *** namelist , int (* filter )(const struct dirent *), int ... ... list , int (* filter )(const struct dirent *), int (* compar )(const struct dirent **, const struct dirent **)); int alphasort(const struct dirent ** a , const struc ... t dirent ** b ); int versionsort(const struct dirent ** a , const struct dirent ** b ); #include < fcntl.h > /* AT_* 定数の定義 */ ... #include < dirent.h > int scandirat(int dirfd , const char * dirp , struct dirent *** namelist , int (* filter )(const struct dirent *), int ... ... list , int (* filter )(const struct dirent *), int (* compar )(const struct dirent **, const struct dirent **)); int alphasort(const struct dirent ** a , const struc ... t dirent ** b ); int versionsort(const struct dirent ** a , const struct dirent ** b ); #include < fcntl.h > /* AT_* 定数の定義 */ ... #include < dirent.h > int scandirat(int dirfd , const char * dirp , struct dirent *** namelist , int (* filter )(const struct dirent *), int ... ... ine _GNU_SOURCE /* feature_test_macros (7) 参照 */ #include < dirent.h > ssize_t getdents64(int fd , void * dirp , size_t count ); 注 : getdents () の glibc のラッパー関数は存在しない。「注意 ... ある。 getdents() getdents () システムコールは、オープン済みのファイルディスクリプター fd で参照されるディレクトリから linux_dirent 構造体をいくつか読み出し、 dirp が指しているバッファーに格納する。 count 引数はそのバッファーのサイズを示す。 linux_dirent ... 構造体は以下のように宣言されている。 struct linux_dirent { unsigned long d_ino; /* inode 番号 */ unsigned long d_off; /* 次の linux_dirent へのオフセット */ unsigned short d_recle ... ... ine _GNU_SOURCE /* feature_test_macros (7) 参照 */ #include < dirent.h > ssize_t getdents64(int fd , void * dirp , size_t count ); 注 : getdents () の glibc のラッパー関数は存在しない。「注意 ... ある。 getdents() getdents () システムコールは、オープン済みのファイルディスクリプター fd で参照されるディレクトリから linux_dirent 構造体をいくつか読み出し、 dirp が指しているバッファーに格納する。 count 引数はそのバッファーのサイズを示す。 linux_dirent ... 構造体は以下のように宣言されている。 struct linux_dirent { unsigned long d_ino; /* inode 番号 */ unsigned long d_off; /* 次の linux_dirent へのオフセット */ unsigned short d_recle ... ... リームの中で、 次のディレクトリエントリーを表す dirent 構造体へのポインターを返す。 ディレクトリストリームの末尾に達した場合や、 エラーが発生した場合は、 NULL を返す。 glibc の実 ... 装では dirent 構造体は以下のように定義されている。 struct dirent { ino_t d_ino; /* inode 番号 */ off_t d_off; /* オフセットではない; 下記 ... ファイル種別。全ファイルシステム */ でサポートされているわけではない */ char d_name[256]; /* ヌル終端されたファイル名 */ }; dirent 構造体のフィールドのうち POSIX.1 で要求されているのは、 d_name と d_ino だけである。他のフィールドは非標準であり、すべての ... ... getdents (2) によって置き換えられた。 readdir () は、ファイルディスクリプター fd が参照しているディレクトリから old_linux_dirent 構造体をひとつ読み込み、 dirp で指されたバッファーに格納する。 count 引数は無視される。最大で 1 個の old_linux_dirent 構造 ... 体が読み出される。 old_linux_dirent 構造体は (Linux カーネルのファイル fs/readdir.c で内部用として) 以下のように宣言される: struct old_linux_dirent { unsigned ... long d_ino; /* inode 番号 */ unsigned long d_offset; /* この old_linux_dirent へのオフセット */ unsigned short d_namlen; /* この d_name の長さ */ char d_name[1]; /* (NULL 終端された) ファイル名 */ } d ... ... rp から次のディレクトリエントリーを読み込み、 entry が指す呼び出し元が割り当てたバッファーにそのエントリーを格納して返す。 dirent 構造体の詳細は readdir (3) を参照。 結果を返すバッファへのポインターが *result に格納される。ディレクトリストリームの末尾に ... ... 日本語の文書やマニュアルを配布している個人/プロジェクトへのリンクです。