23 lines
491 B
C++
23 lines
491 B
C++
#pragma once
|
|
#include <string>
|
|
#include <functional>
|
|
|
|
class DirWalk
|
|
{
|
|
public:
|
|
DirWalk(const std::string& DirName);
|
|
~DirWalk();
|
|
// noncopyable, nonmovable.
|
|
DirWalk(const DirWalk&) = delete;
|
|
DirWalk& operator = (const DirWalk&) = delete;
|
|
DirWalk(DirWalk&&) = delete;
|
|
DirWalk& operator = (DirWalk&&) = delete;
|
|
|
|
bool isReady() const;
|
|
int next(std::string& name, bool& is_dir);
|
|
std::string getroot() const;
|
|
private:
|
|
struct _impl;
|
|
_impl* _p;
|
|
};
|