Advancing along here.
This commit is contained in:
parent
5bd9e9ca21
commit
c3c9530b4b
14
Directory.h
14
Directory.h
@ -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();
|
||||
|
@ -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:
|
||||
|
2
File.cpp
2
File.cpp
@ -23,7 +23,7 @@ namespace coreutils {
|
||||
}
|
||||
|
||||
File::~File() {
|
||||
|
||||
close(fd);
|
||||
}
|
||||
|
||||
void File::setBufferSize(size_t size) {
|
||||
|
@ -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);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user