F´ Flight Software - C/C++ Documentation  devel
A framework for building embedded system applications to NASA flight quality standards.
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Directory.hpp
Go to the documentation of this file.
1 // ======================================================================
2 // \title Os/Stub/Directory.hpp
3 // \brief stub definitions for Os::Directory
4 // ======================================================================
5 #ifndef OS_STUB_DIRECTORY_HPP
6 #define OS_STUB_DIRECTORY_HPP
7 
8 #include "Os/Directory.hpp"
9 namespace Os {
10 namespace Stub {
11 namespace Directory {
12 
14 
20  public:
22  StubDirectory() = default;
23 
25  ~StubDirectory() override = default;
26 
29  DirectoryHandle* getHandle() override;
30 
31  // ------------------------------------------------------------
32  // Implementation-specific Directory member functions
33  // ------------------------------------------------------------
34 
48  Status open(const char* path, OpenMode mode) override;
49 
52  bool isOpen();
53 
59  Status rewind() override;
60 
72  Status read(char * fileNameBuffer, FwSizeType buffSize) override;
73 
74 
76  void close() override;
77 
78 
79  private:
81  StubDirectoryHandle m_handle;
82 };
83 
84 } // namespace Directory
85 } // namespace Stub
86 } // namespace Os
87 #endif // OS_STUB_DIRECTORY_HPP
PlatformSizeType FwSizeType
Definition: FpConfig.h:35
stub implementation of Os::Directory
Definition: Directory.hpp:19
~StubDirectory() override=default
destructor
Status open(const char *path, OpenMode mode) override
Open or create a directory.
Definition: Directory.cpp:11
void close() override
Close directory.
Definition: Directory.cpp:23
Status read(char *fileNameBuffer, FwSizeType buffSize) override
Get next filename from directory stream.
Definition: Directory.cpp:19
Status rewind() override
Rewind directory stream.
Definition: Directory.cpp:15
bool isOpen()
Check if Directory is open or not.
DirectoryHandle * getHandle() override
return the underlying Directory handle (implementation specific)
Definition: Directory.cpp:27
StubDirectory()=default
constructor