| 848 | } |
| 849 | |
| 850 | int 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 | |
| 867 | int FileSystem::getFilePath(FileID fileid, NameBuffer& buffer) |
| 868 | { |
no test coverage detected