[ox/fs] Add new FileStore write
This commit is contained in:
@@ -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;
|
||||
|
10
deps/ox/src/ox/fs/filesystem/pathiterator.hpp
vendored
10
deps/ox/src/ox/fs/filesystem/pathiterator.hpp
vendored
@@ -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
|
||||
*/
|
||||
|
Reference in New Issue
Block a user