Newer
Older
/*
Copyright 2018-2019, Barcelona Supercomputing Center (BSC), Spain
Copyright 2015-2019, Johannes Gutenberg Universitaet Mainz, Germany
This software was partially supported by the
EC H2020 funded project NEXTGenIO (Project ID: 671951, www.nextgenio.eu).
This software was partially supported by the
ADA-FS project under the SPPEXA project funded by the DFG.
SPDX-License-Identifier: MIT
*/
#ifndef IFS_OPEN_DIR_HPP
#define IFS_OPEN_DIR_HPP
#include <string>
#include <vector>
#include <dirent.h>
class OpenDir: public OpenFile {
private:
class DirEntry {
public:
std::string name;
DirEntry(const std::string& name, const FileType type);
};
std::vector<DirEntry> entries;
struct dirent dirent_;
bool is_dirent_valid;
void update_dirent(unsigned int pos);
public:
OpenDir(const std::string& path);
void add(const std::string& name, const FileType& type);