blob: 6021effa77acb4c7bcf3d6504268021d7137514e (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
|
#pragma once
#include <string>
#include <memory>
namespace DB
{
/**
* Iterator of directory contents
*/
class IDirectoryIterator
{
public:
/// Iterate to the next file.
virtual void next() = 0;
/// Return `true` if the iterator points to a valid element.
virtual bool isValid() const = 0;
/// Path to the file that the iterator currently points to.
virtual std::string path() const = 0;
/// Name of the file that the iterator currently points to.
virtual std::string name() const = 0;
virtual ~IDirectoryIterator() = default;
};
using DirectoryIteratorPtr = std::unique_ptr<IDirectoryIterator>;
}
|