> For the complete documentation index, see [llms.txt](https://sandbox-docs.verifone.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://sandbox-docs.verifone.com/adk-5.0-programmers-guide/directory_8h_source.md).

# directory.h

[Go to the documentation of this file.](/adk-5.0-programmers-guide/readme/files/dir_44d926a17fc606d3c25449ba60427c63/dir_048f823fee1bfb22502a8732b9a001aa/directory_8h.md)

```cpp
 1 #ifndef DIRECTORY_H
 2 #define DIRECTORY_H
 3 
 4 #include <string>
 5 
 9 class Directory
 10 {
 11 
 12  public:
 13 
 14  enum FileType { File, Dir, Link, Special };
 15  enum { Read = 1, Write = 2 };
 16 
 17 
 19  struct Entry
 20  {
 21  std::string name;
 22  std::string filename;
 23  unsigned type;
 24  unsigned mode;
 25  unsigned size;
 26  unsigned year;
 27  unsigned char month;
 28  unsigned char day;
 29  unsigned char hour;
 30  unsigned char min;
 31  unsigned char sec;
 32  Entry()
 33  {
 34  type = mode = size = year = 0;
 35  month = day = hour = min = sec = 0;
 36  }
 37  };
 38 
 39 
 40 
 41  private:
 42  void *dir;
 43  std::string dirname;
 44  Entry backup;
 45  int push_back;
 46 
 47  // disable the default copy constructor and assignment operator
 48  Directory(const Directory &);
 49  void operator=(const Directory &);
 50 
 51  public:
 52 
 54  Directory();
 55 
 57  virtual ~Directory()
 58  {
 59  close();
 60  }
 61 
 66  int open(const std::string &_dirname);
 67 
 72  int readEntry(Entry &entry);
 73 
 77  void pushBack()
 78  {
 79  push_back = 1;
 80  }
 81 
 83  void close();
 84 
 85 
 86 };
 87 
 88 
 89 
 90 #endif
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://sandbox-docs.verifone.com/adk-5.0-programmers-guide/directory_8h_source.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
