mirror of
https://github.com/davidgiven/fluxengine.git
synced 2025-10-31 11:17:01 -07:00
Renaming files sort of works.
This commit is contained in:
@@ -39,7 +39,7 @@ public:
|
||||
uint32_t capabilities() const
|
||||
{
|
||||
return OP_GETFSDATA | OP_CREATE | OP_LIST | OP_GETFILE | OP_PUTFILE |
|
||||
OP_GETDIRENT;
|
||||
OP_GETDIRENT | OP_MOVE;
|
||||
}
|
||||
|
||||
std::map<std::string, std::string> getMetadata() override
|
||||
@@ -188,6 +188,15 @@ public:
|
||||
throwError(res);
|
||||
}
|
||||
|
||||
void moveFile(const Path& oldPath, const Path& newPath) override
|
||||
{
|
||||
mount();
|
||||
auto oldPathStr = oldPath.to_str();
|
||||
auto newPathStr = newPath.to_str();
|
||||
FRESULT res = f_rename(oldPathStr.c_str(), newPathStr.c_str());
|
||||
throwError(res);
|
||||
}
|
||||
|
||||
private:
|
||||
std::shared_ptr<Dirent> toDirent(FILINFO& filinfo, const Path& parent)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user