_findnexti64, _wfindnexti64
io.h:インデックス への移動
ヘッダーファイル
io.h, wchar.h
カテゴリ
ディレクトリ制御ルーチン
プロトタイプ
long _findnexti64(long handle, struct _finddatai64_t *fileinfo);
__int64 _wfindnexti64(long handle, struct _wfinddata_t *fileinfo);
説明
前回の _findfirsti64/_wfindfirsti64 の呼び出しで使用された filter 引数に一致する後続のファイルがある場合は,それを検索します。次に,_findnexti64/_wfindnexti64 は,検索を続けるために必要な情報で fileinfo 構造体を更新します。このディレクトリでパス名(フィルタ)に一致するファイルが見つからなくなるまで,_tfindnext を呼び出すたびに 1 つのファイル名が返されます。
この handle パラメータは,前の _findfirst の呼び出しによって返された検索ハンドルです。fileinfo パラメータは,ファイル情報のバッファです。
これらの i64 バージョンは,64 ビットのファイルサイズ用で,Microsoft との互換性のために提供されています。
戻り値
成功した場合は 0 を返します。
そうでない場合は -1 を返し,errno を次の値に設定します。
ENOENT - ファイル指定が一致しない
例
#include <io.h>
void print_dir(wchar_t* dir_name)
{
/* Open a find stream (_wfinddatai64_t and a find handle) */
_wfinddatai64_t find_data;
long handle = _wfindfirsti64(dir_name, &find_data);
/* Check for errors */
if (!handle)
return;
/* Scan all files that mach */
do
{
printf("%ls\n", find_data.name);
} while (!'''_wfindnexti64'''(handle, &find_data));
/* Close the find handle */
_findclose(handle);
}
移植性
POSIX | Win32 | ANSI C | ANSI C++ | |
---|---|---|---|---|
_findnexti64 |
+ |
|||
_wfindnexti64 |
NT のみ |