X-Git-Url: https://codewiz.org/gitweb?a=blobdiff_plain;ds=sidebyside;f=fs%2Fbattfs.c;h=fd8fe1c6761b6cabdbb5c65a4eac8bba894c05b3;hb=cb475c2071d6be7048f8c5c06485b3cd8530708c;hp=d17bc372882d9860bbb71e336c3188aaaed3fa91;hpb=90f3a07ec855d9bf82367d00f262c478434993d5;p=bertos.git diff --git a/fs/battfs.c b/fs/battfs.c index d17bc372..fd8fe1c6 100644 --- a/fs/battfs.c +++ b/fs/battfs.c @@ -681,6 +681,14 @@ static pgcnt_t *findFile(BattFsSuper *disk, inode_t inode) return NULL; } +/** + * \return true if file \a inode exists on \a disk, false otherwise. + */ +bool battfs_fileExists(BattFsSuper *disk, inode_t inode) +{ + return findFile(disk, inode) != NULL; +} + /** * Count size of file \a inode on \a disk, starting at pointer \a start * in disk->page_array. Size is written in \a size.