[ox/fs] Add fullPath method to PathIterator

This commit is contained in:
Gary Talent 2018-07-07 14:27:17 -05:00
parent e1494f4ed0
commit c35f7abc5b
2 changed files with 6 additions and 2 deletions

View File

@ -183,10 +183,8 @@ bool PathIterator::valid() const {
PathIterator PathIterator::operator+(int i) const {
std::size_t size = 0;
Error retval = 1;
auto iterator = m_iterator;
if (iterator < m_maxSize && ox_strlen(&m_path[iterator])) {
retval = 0;
if (m_path[iterator] == '/') {
iterator++;
}
@ -204,4 +202,8 @@ PathIterator PathIterator::operator+(int i) const {
return PathIterator(m_path, m_maxSize, iterator + i);
}
const char *PathIterator::fullPath() const {
return m_path;
}
}

View File

@ -67,6 +67,8 @@ class PathIterator {
PathIterator operator+(int i) const;
const char *fullPath() const;
};
}