X-Git-Url: https://codewiz.org/gitweb?a=blobdiff_plain;f=fs%2Fbattfs.c;h=fd8fe1c6761b6cabdbb5c65a4eac8bba894c05b3;hb=99fafc49f3b2d50abb2d7b8b4cbbd3be8e107bef;hp=d17bc372882d9860bbb71e336c3188aaaed3fa91;hpb=8bab11971bc4e89f1a0ab56101ed3babf93fcd1d;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.