Advancing along here.

This commit is contained in:
Brad Arant committed 2020-12-09 09:43:52 -08:00
1 parent 5bd9e9ca21
commit c3c9530b4b
4 files changed
+12 -10

No files matched your search

+7 -7
View File
@@ -10,13 +10,13 @@ namespace coreutils {
public: public:
Directory(std::string path) { Directory(std::string path) {
dir = opendir(path.c_str()); dir = opendir(path.c_str());
if(dir) { if(dir) {
struct dirent *entry = readdir(dir); struct dirent *entry = readdir(dir);
while(entry) { while(entry) {
directory.emplace(std::string(entry->d_name), entry); directory.emplace(std::string(entry->d_name), entry);
entry = readdir(dir); entry = readdir(dir);
} }
} }
if(directory.size() > 0) if(directory.size() > 0)
cursor = directory.begin(); cursor = directory.begin();
+2 -2
View File
@@ -9,13 +9,13 @@ namespace coreutils {
public: public:
DirectoryEntry(struct dirent *entry) { DirectoryEntry(struct dirent *entry) {
memcpy(&this->entry, entry, sizeof(struct dirent)); memcpy(&this->entry, entry, sizeof(struct dirent));
} }
~DirectoryEntry() {} ~DirectoryEntry() {}
std::string getName() { std::string getName() {
return std::string(entry.d_name); return std::string(entry.d_name);
} }
private: private:
+1 -1
View File
@@ -23,7 +23,7 @@ namespace coreutils {
} }
File::~File() { File::~File() {
close(fd);
} }
void File::setBufferSize(size_t size) { void File::setBufferSize(size_t size) {
+2
View File
@@ -16,6 +16,8 @@ namespace coreutils {
bool IMFMessage::parse(PString &in) { bool IMFMessage::parse(PString &in) {
coreutils::Log(coreutils::LOG_DEBUG_1) << "Parsing-------\n" << in.str();
while (!in.ifNext("\r\n")) { while (!in.ifNext("\r\n")) {
headers.emplace_back(in); headers.emplace_back(in);
} }