add NffsFile, NffsDir, NffsDirentry class
This commit is contained in:
1 parent
36c5c3cfcc
commit
be7a784586
7 files changed
+319
No files matched your search
@@ -60,6 +60,23 @@ bool NffsFile::open(const char* path, uint8_t flags)
|
||||
return (errnum == FS_EOK);
|
||||
}
|
||||
|
||||
bool NffsFile::open(NffsDirEntry& dirent, uint8_t flags)
|
||||
{
|
||||
bool result = false;
|
||||
char* name = (char*) rtos_malloc(NFFS_FILENAME_MAX_LEN+1);
|
||||
|
||||
VERIFY(name);
|
||||
|
||||
if ( dirent.getName(name, NFFS_FILENAME_MAX_LEN+1) > 0 )
|
||||
{
|
||||
result = open(name, flags);
|
||||
}
|
||||
|
||||
rtos_free(name);
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
bool NffsFile::existed(void)
|
||||
{
|
||||
return _file != NULL;
|
||||
|
||||
Reference in new issue
Block a user