rename nffs existed() to exists()

This commit is contained in:
hathach committed 2017-03-01 14:34:30 +07:00
1 parent 789f76fab2
commit 1abc60fc1b
9 files changed
+16 -8

No files matched your search

@@ -30,7 +30,7 @@ void setup()
file.open(FILENAME, FS_ACCESS_READ);
// file existed
if ( file.existed() )
if ( file.exists() )
{
Serial.println(FILENAME " file existed");
+5
View File
@@ -48,6 +48,11 @@ void NewtNffs::begin(void)
nffs_pkg_init();
}
bool NewtNffs::format(void)
{
}
bool NewtNffs::mkdir(const char* path)
{
errnum = fs_mkdir(path);
+3
View File
@@ -54,6 +54,9 @@ public:
void begin(void);
// Format the flash
bool format(void);
// Make a directory, All intermediate directories must already exist
bool mkdir(const char* path);
+2 -2
View File
@@ -91,7 +91,7 @@ bool NffsDir::close(void)
return (errnum == FS_EOK);
}
bool NffsDir::existed(void)
bool NffsDir::exists(void)
{
return (_dir != NULL);
}
@@ -109,5 +109,5 @@ bool NffsDir::read(NffsDirEntry* entry)
{
*entry = read();
return entry->existed();
return entry->exists();
}
+1 -1
View File
@@ -57,7 +57,7 @@ public:
bool open(const char* parent_dir, NffsDirEntry& dirent);
bool close(void);
bool existed(void);
bool exists(void);
NffsDirEntry read(void);
bool read(NffsDirEntry* entry);
+1 -1
View File
@@ -53,7 +53,7 @@ NffsDirEntry& NffsDirEntry::operator=(const NffsDirEntry& rhs)
return (*this);
}
bool NffsDirEntry::existed(void)
bool NffsDirEntry::exists(void)
{
return _dirent != NULL;
}
+1 -1
View File
@@ -49,7 +49,7 @@ public:
NffsDirEntry& operator=(const NffsDirEntry& rhs);
bool existed(void);
bool exists(void);
size_t getName(char* name, size_t bufsize);
bool isDirectory(void);
+1 -1
View File
@@ -82,7 +82,7 @@ bool NffsFile::open(const char* parent_dir, NffsDirEntry& dirent, uint8_t flags)
return result;
}
bool NffsFile::existed(void)
bool NffsFile::exists(void)
{
return _file != NULL;
}
+1 -1
View File
@@ -55,7 +55,7 @@ public:
bool open(const char* parent_dir, NffsDirEntry& dirent, uint8_t flags = FS_ACCESS_READ);
bool close(void);
bool existed(void);
bool exists(void);
uint32_t size(void);
uint32_t tell(void);