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:
|
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();
|
||||||
|
@ -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:
|
||||||
|
2
File.cpp
2
File.cpp
@ -23,7 +23,7 @@ namespace coreutils {
|
|||||||
}
|
}
|
||||||
|
|
||||||
File::~File() {
|
File::~File() {
|
||||||
|
close(fd);
|
||||||
}
|
}
|
||||||
|
|
||||||
void File::setBufferSize(size_t size) {
|
void File::setBufferSize(size_t size) {
|
||||||
|
@ -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);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user