#ifndef __OOL_XFILEFIND_H__
#define __OOL_XFILEFIND_H__

/*===========================================================================*/
/* OOL ------------------- the Open Object Library ------------- OS/2 Beta 1 */
/*===========================================================================*/
/*                              class: XFileFind                             */
/*                       derived from: XObject                               */
/*                        last update: 12/96                                 */
/*                      programmed by: Stefan von Brauk (sbrauk@gwdg.de)     */
/*===========================================================================*/

#include "xstring.h"
#include "xobject.h"

#ifdef OOL_FOR_OS2_X86
   #define XFILE_NORMAL		0x0000
   #define XFILE_HIDDEN		0x0002
   #define XFILE_SYSTEM		0x0004
   #define XFILE_DIRECTORY		0x0010
   #define XFILE_ARCHIVED		0x0020
   #define XMUST_HAVE_READONLY	(FILE_READONLY	| (FILE_READONLY  << 8))
   #define XMUST_HAVE_HIDDEN	(FILE_HIDDEN	| (FILE_HIDDEN	  << 8))
   #define XMUST_HAVE_SYSTEM	(FILE_SYSTEM	| (FILE_SYSTEM	  << 8))
   #define XMUST_HAVE_DIRECTORY	(FILE_DIRECTORY | (FILE_DIRECTORY << 8))
   #define XMUST_HAVE_ARCHIVED	(FILE_ARCHIVED	| (FILE_ARCHIVED  << 8))
#endif

class XString;

class _export_ XFileFind: public XObject
{
   private:
      FILEFINDBUF3 buffer;
      HDIR dir;
      XString mask;
      LONG options;
      BOOL init;
   public:
      XFileFind( const char * file, const LONG options=XFILE_NORMAL);
      ~XFileFind();
      BOOL Find( XString * );
};

#endif
