-
-
Notifications
You must be signed in to change notification settings - Fork 348
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add streaming filesystem backup support (#2323)
This PR adds the `ArchiveStream` class to support backing up filesystems. The archive files are in FWFS format. - Add FWFS for user attribute support User attributes can be set (via callback) during the backup operation and read backup using the standard IFS API. - Add Encrypted file attribute Files may be encrypted via `IBlockEncoder` plugin, which would set this attribute. - Add `Comment` standard attribute Standard comment of up to 255 characters (FWFS and LittleFS). - Add check in fsbuild for duplicate directories/files, and allow paths to be specified in source Tests have been updated accordingly.
- Loading branch information
Showing
6 changed files
with
89 additions
and
21 deletions.
There are no files selected for viewing
Submodule IFS
updated
20 files
+112 −33 | README.rst | |
+474 −0 | src/FWFS/ArchiveStream.cpp | |
+26 −10 | src/FWFS/FileSystem.cpp | |
+2 −0 | src/FWFS/Object.cpp | |
+2 −1 | src/include/IFS/Attribute.h | |
+275 −0 | src/include/IFS/FWFS/ArchiveStream.h | |
+81 −0 | src/include/IFS/FWFS/BlockEncoder.h | |
+44 −0 | src/include/IFS/FWFS/Object.h | |
+114 −0 | src/include/IFS/FWFS/ObjectBuffer.h | |
+2 −1 | src/include/IFS/FileAttributes.h | |
+5 −0 | src/include/IFS/FsBase.h | |
+13 −0 | src/include/IFS/IFileSystem.h | |
+17 −0 | src/include/IFS/NameBuffer.h | |
+6 −6 | test/app/FsTest.cpp | |
+6 −1 | test/fstest.hw | |
+1 −0 | test/include/modules.h | |
+215 −0 | test/modules/Archive.cpp | |
+28 −2 | test/modules/Attributes.cpp | |
+6 −0 | tools/fsbuild/FWFS.py | |
+16 −1 | tools/fsbuild/fsbuild.py |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
/**** | ||
* Sming Framework Project - Open Source framework for high efficiency native ESP8266 development. | ||
* Created 2015 by Skurydin Alexey | ||
* http://github.com/anakod/Sming | ||
* All files of the Sming Core are provided under the LGPL v3 license. | ||
* | ||
* ArchiveStream.h | ||
* | ||
* @author mikee47 <mike@sillyhouse.net> April 2021 | ||
* | ||
* | ||
****/ | ||
|
||
#pragma once | ||
|
||
#include <IFS/FWFS/ArchiveStream.h> | ||
#include <FileSystem.h> | ||
|
||
class ArchiveStream : public IFS::FWFS::ArchiveStream | ||
{ | ||
public: | ||
using IFS::FWFS::ArchiveStream::ArchiveStream; | ||
|
||
ArchiveStream(VolumeInfo volumeInfo, String rootPath = nullptr, Flags flags = 0) | ||
: ArchiveStream(::getFileSystem(), volumeInfo, rootPath, flags) | ||
{ | ||
} | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Submodule LittleFS
updated
2 files
+11 −1 | src/FileSystem.cpp | |
+2 −1 | src/include/LittleFS/FileSystem.h |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters