diff options
| author | Carl Hetherington <cth@carlh.net> | 2012-12-01 18:51:07 +0000 |
|---|---|---|
| committer | Carl Hetherington <cth@carlh.net> | 2012-12-01 18:51:07 +0000 |
| commit | 5edd130eafacda6233df537a76a3c1fe69c7e660 (patch) | |
| tree | 10cce1b97051fff356977a19285d00a3c8642e0a /asdcplib/src/KM_fileio.h | |
| parent | 56f27201d8d882a4064a69314c78e1fcf1b0bb77 (diff) | |
Reimplement Kumu::DirScanner using boost to avoid dependency on msvcr100 on Windows.
Diffstat (limited to 'asdcplib/src/KM_fileio.h')
| -rwxr-xr-x | asdcplib/src/KM_fileio.h | 31 |
1 files changed, 12 insertions, 19 deletions
diff --git a/asdcplib/src/KM_fileio.h b/asdcplib/src/KM_fileio.h index 2f2718cd..b078e32b 100755 --- a/asdcplib/src/KM_fileio.h +++ b/asdcplib/src/KM_fileio.h @@ -34,6 +34,7 @@ THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. #include <KM_util.h> #include <string> +#include <boost/filesystem.hpp> #ifdef KM_WIN32 # include <io.h> @@ -51,24 +52,16 @@ THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. namespace Kumu { - // class DirScanner - { - public: -#ifdef KM_WIN32 - __int64 m_Handle; - struct _finddatai64_t m_FileInfo; -#else - DIR* m_Handle; -#endif - - DirScanner(void); - ~DirScanner() { Close(); } - - Result_t Open(const char*); - Result_t Close(); - Result_t GetNext(char*); - }; + { + public: + DirScanner(); + Result_t Open(const char *); + Result_t GetNext(char *); + Result_t Close(); + private: + boost::filesystem::directory_iterator _iterator; + }; #ifdef KM_WIN32 typedef __int64 fsize_t; @@ -91,8 +84,8 @@ namespace Kumu SP_POS = SEEK_CUR, SP_END = SEEK_END }; -#endif - +#endif + // #ifndef KM_SMALL_FILES_OK template <bool sizecheck> void compile_time_size_checker(); |
