/*
-Copyright (c) 2004-2014, John Hurst
+Copyright (c) 2004-2016, John Hurst
All rights reserved.
Redistribution and use in source and binary forms, with or without
#ifdef KM_WIN32
# include <io.h>
+# include "dirent_win.h"
#else
# include <dirent.h>
# include <unistd.h>
class DirScanner
{
public:
-#ifdef KM_WIN32
- __int64 m_Handle;
- struct _finddatai64_t m_FileInfo;
-#else
DIR* m_Handle;
-#endif
DirScanner(void);
~DirScanner() { Close(); }
class DirScannerEx
{
std::string m_Dirname;
-#ifdef KM_WIN32
- __int64 m_Handle;
- struct _finddatai64_t m_FileInfo;
-#else
DIR* m_Handle;
-#endif
KM_NO_COPY_CONSTRUCT(DirScannerEx);
{
public:
virtual ~PathMatchAny() {}
- inline bool Match(const std::string& s) const { return true; }
+ inline bool Match(const std::string&) const { return true; }
};
#ifndef KM_WIN32
PathList_t& FindInPaths(const IPathMatch& Pattern, const PathList_t& SearchPaths,
PathList_t& FoundPaths, bool one_shot = false, char separator = '/');
+ std::string GetExecutablePath(const std::string& default_path);
+
//------------------------------------------------------------------------------------------
// Directory Manipulation
//------------------------------------------------------------------------------------------