[ox/fs] Add new FileStore write

This commit is contained in:
2018-04-26 21:11:48 -05:00
parent 59cc34b4e8
commit 24fbb8ba86
9 changed files with 81 additions and 35 deletions

View File

@@ -89,6 +89,13 @@ int PathIterator::next(char *pathOut, std::size_t pathOutSize) {
return retval;
}
/**
* @return 0 if no error
*/
int PathIterator::next(BString<MaxFileNameLength> *fileName) {
return next(fileName->data(), fileName->cap());
}
ValErr<std::size_t> PathIterator::nextSize() const {
std::size_t size = 0;
Error retval = 1;

View File

@@ -8,11 +8,12 @@
#pragma once
#include <ox/std/strops.hpp>
#include <ox/std/types.hpp>
#include <ox/std/std.hpp>
namespace ox {
constexpr auto MaxFileNameLength = 255;
class PathIterator {
private:
const char *m_path = nullptr;
@@ -39,6 +40,11 @@ class PathIterator {
*/
int next(char *pathOut, std::size_t pathOutSize);
/**
* @return 0 if no error
*/
int next(BString<MaxFileNameLength> *fileName);
/**
* @return 0 if no error
*/