Coverage Report

Created: 2023-11-12 09:30

/proc/self/cwd/source/common/filesystem/directory.h
Line
Count
Source
1
#pragma once
2
3
#include <string>
4
5
#include "envoy/filesystem/filesystem.h"
6
7
#include "source/common/filesystem/directory_iterator_impl.h"
8
9
namespace Envoy {
10
namespace Filesystem {
11
12
// This class does not do any validation of input data. Do not use with untrusted inputs.
13
class Directory {
14
public:
15
6.78k
  Directory(const std::string& directory_path) : directory_path_(directory_path) {}
16
17
6.78k
  DirectoryIteratorImpl begin() { return {directory_path_}; }
18
19
6.78k
  DirectoryIteratorImpl end() { return {}; }
20
21
private:
22
  const std::string directory_path_;
23
};
24
25
} // namespace Filesystem
26
} // namespace Envoy