mirror of
https://github.com/RGBCube/serenity
synced 2025-07-26 12:57:34 +00:00
Libraries: Create top level directory for libraries.
Things were getting a little crowded in the project root, so this patch moves the Lib*/ directories into Libraries/.
This commit is contained in:
parent
63814ffebf
commit
04b9dc2d30
328 changed files with 36 additions and 36 deletions
29
Libraries/LibCore/CDirIterator.h
Normal file
29
Libraries/LibCore/CDirIterator.h
Normal file
|
@ -0,0 +1,29 @@
|
|||
#pragma once
|
||||
|
||||
#include <AK/AKString.h>
|
||||
#include <dirent.h>
|
||||
|
||||
class CDirIterator {
|
||||
public:
|
||||
enum Flags {
|
||||
NoFlags = 0x0,
|
||||
SkipDots = 0x1,
|
||||
};
|
||||
|
||||
CDirIterator(const StringView& path, Flags = Flags::NoFlags);
|
||||
~CDirIterator();
|
||||
|
||||
bool has_error() const { return m_error != 0; }
|
||||
int error() const { return m_error; }
|
||||
const char* error_string() const { return strerror(m_error); }
|
||||
bool has_next();
|
||||
String next_path();
|
||||
|
||||
private:
|
||||
DIR* m_dir = nullptr;
|
||||
int m_error = 0;
|
||||
String m_next;
|
||||
int m_flags;
|
||||
|
||||
bool advance_next();
|
||||
};
|
Loading…
Add table
Add a link
Reference in a new issue