00001 /* 00002 FALCON - The Falcon Programming Language. 00003 FILE: dir_win.h 00004 00005 Support for directory oriented operations in unix systems 00006 ------------------------------------------------------------------- 00007 Author: Giancarlo Niccolai 00008 Begin: dom nov 7 2004 00009 00010 ------------------------------------------------------------------- 00011 (C) Copyright 2004: the FALCON developers (see list in AUTHORS file) 00012 00013 See LICENSE file for licensing details. 00014 */ 00015 00020 #ifndef flc_dir_win_H 00021 #define flc_dir_win_H 00022 00023 #include <windows.h> 00024 #ifndef INVALID_FILE_ATTRIBUTES 00025 #define INVALID_FILE_ATTRIBUTES ((DWORD)-1) 00026 #endif 00027 00028 #include <falcon/dir_sys.h> 00029 00030 namespace Falcon { 00031 00032 class String; 00033 00034 class DirEntry_win: public DirEntry 00035 { 00036 00037 protected: 00038 HANDLE m_handle; 00039 WIN32_FIND_DATAW m_raw_dir; 00040 bool m_first; 00041 uint32 m_lastError; 00042 00043 public: 00044 DirEntry_win( const String &p, HANDLE handle, WIN32_FIND_DATAW dir_data ): 00045 DirEntry(p), 00046 m_first( true ), 00047 m_lastError( 0 ), 00048 m_handle( handle ), 00049 m_raw_dir( dir_data ) 00050 {} 00051 00052 ~DirEntry_win() { 00053 close(); 00054 } 00055 00056 virtual bool read( String &name ); 00057 virtual void close(); 00058 }; 00059 00060 } 00061 00062 #endif 00063 00064 /* end of dir_win.h */