Creating directories works, more or less.

This commit is contained in:
David Given
2022-09-07 00:32:01 +02:00
parent 0111ed37ba
commit 352abe07d8
7 changed files with 402 additions and 3 deletions

View File

@@ -39,7 +39,7 @@ public:
uint32_t capabilities() const
{
return OP_GETFSDATA | OP_CREATE | OP_LIST | OP_GETFILE | OP_PUTFILE |
OP_GETDIRENT | OP_MOVE;
OP_GETDIRENT | OP_MOVE | OP_CREATEDIR;
}
std::map<std::string, std::string> getMetadata() override
@@ -197,6 +197,14 @@ public:
throwError(res);
}
void createDirectory(const Path& path)
{
mount();
auto pathStr = path.to_str();
FRESULT res = f_mkdir(pathStr.c_str());
throwError(res);
}
private:
std::shared_ptr<Dirent> toDirent(FILINFO& filinfo, const Path& parent)
{