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