Artifact Content

Not logged in

Artifact 64a6dbf816844dbad4ac1e21ff5eb466b9b99d4d


     1  //--- K.I.LIB ---
     2  // kl_find.h : FindFirstFile wrapper
     3  
     4  #ifndef AFX_KIFINDFILE_H__86462791_815C_4F44_9F16_802B54B411BA__INCLUDED_
     5  #define AFX_KIFINDFILE_H__86462791_815C_4F44_9F16_802B54B411BA__INCLUDED_
     6  
     7  /*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*=*/
     8  // ファイル検索
     9  
    10  class kiFindFile
    11  {
    12  public: //-- 外向きインターフェイス --------------------------
    13  
    14  	static bool findfirst( const char* wild, WIN32_FIND_DATA* pfd );
    15  	bool begin( const char* wild );
    16  	bool next( WIN32_FIND_DATA* pfd );
    17  
    18  public: //-- 内部処理 -----------------------------------
    19  
    20  	kiFindFile()
    21  		{ h = INVALID_HANDLE_VALUE; }
    22  	virtual ~kiFindFile()
    23  		{ close(); }
    24  	void close();
    25  
    26  private:
    27  	HANDLE h;
    28  	bool first;
    29  	WIN32_FIND_DATA fd;
    30  };
    31  
    32  #endif