MCPcopy Create free account
hub / github.com/SmingHub/Sming / fremove

Method fremove

Sming/Libraries/Spiffs/src/FileSystem.cpp:850–865  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

848}
849
850int FileSystem::fremove(FileHandle file)
851{
852 CHECK_MOUNTED()
853
854 // If file is marked read-only, fail request
855 auto smb = getMetaBuffer(file);
856 if(smb == nullptr) {
857 return Error::InvalidHandle;
858 }
859 if(smb->meta.attr[FileAttribute::ReadOnly]) {
860 return Error::ReadOnly;
861 }
862
863 int err = SPIFFS_fremove(handle(), file);
864 return translateSpiffsError(err);
865}
866
867int FileSystem::getFilePath(FileID fileid, NameBuffer& buffer)
868{

Callers 1

fileDeleteFunction · 0.80

Calls 1

translateSpiffsErrorFunction · 0.85

Tested by

no test coverage detected