mirror of
				https://github.com/RetroShare/RetroShare.git
				synced 2025-10-31 06:42:04 -04:00 
			
		
		
		
	 78edc7687e
			
		
	
	
		78edc7687e
		
	
	
	
	
		
			
			Moved the includes of rswin.h from the header files to the c files. git-svn-id: http://svn.code.sf.net/p/retroshare/code/branches/v0.5-gxs-b1@5655 b45a01b8-16f6-495d-af2f-9b41ad6348cc
		
			
				
	
	
		
			53 lines
		
	
	
	
		
			799 B
		
	
	
	
		
			C++
		
	
	
	
	
	
			
		
		
	
	
			53 lines
		
	
	
	
		
			799 B
		
	
	
	
		
			C++
		
	
	
	
	
	
| #ifndef FOLDERITERATOR_H
 | |
| #define FOLDERITERATOR_H
 | |
| 
 | |
| 
 | |
| #include <iostream>
 | |
| #include <cstdio>
 | |
| 
 | |
| #ifdef WINDOWS_SYS
 | |
|     #include <windows.h>
 | |
|     #include <tchar.h>
 | |
|     #include <stdio.h>
 | |
|     #include <string.h>
 | |
| #else
 | |
|     #include <dirent.h>
 | |
| #endif
 | |
| 
 | |
| 
 | |
| namespace librs { namespace util {
 | |
| 
 | |
| 
 | |
| class FolderIterator
 | |
| {
 | |
| public:
 | |
|     FolderIterator(const std::string& folderName);
 | |
|     ~FolderIterator();
 | |
| 
 | |
|     bool isValid() const    { return validity; }
 | |
| 
 | |
|     bool readdir();
 | |
| 
 | |
|     bool d_name(std::string& dest);
 | |
| 
 | |
|     bool closedir();
 | |
| 
 | |
| private:
 | |
|     bool validity;
 | |
| 
 | |
| #ifdef WINDOWS_SYS
 | |
|     HANDLE handle;
 | |
|     bool isFirstCall;
 | |
|     _WIN32_FIND_DATAW fileInfo;
 | |
| #else
 | |
|     DIR* handle;
 | |
|     struct dirent* ent;
 | |
| #endif
 | |
| 
 | |
| };
 | |
| 
 | |
| 
 | |
| } } // librs::util
 | |
| 
 | |
| 
 | |
| #endif // FOLDERITERATOR_H
 |