summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorgkostka <kostka.grzegorz@gmail.com>2017-04-19 20:47:14 +0200
committergkostka <kostka.grzegorz@gmail.com>2017-04-19 20:47:14 +0200
commitc8978f9dba53333004f3f20e5acc57df8867dc16 (patch)
tree3245d618c1fccc84e2629da7a357f3f455357136 /include
parent2a4f69fbabf98920717366cd574f0d4aba1aa3a1 (diff)
ext4: add ext4_inode_exist method
Diffstat (limited to 'include')
-rw-r--r--include/ext4.h16
1 files changed, 16 insertions, 0 deletions
diff --git a/include/ext4.h b/include/ext4.h
index 3e06877..3b88771 100644
--- a/include/ext4.h
+++ b/include/ext4.h
@@ -395,6 +395,22 @@ uint64_t ext4_fsize(ext4_file *file);
int ext4_raw_inode_fill(const char *path, uint32_t *ret_ino,
struct ext4_inode *inode);
+/**@brief Check if inode exists.
+ *
+ * @param path Parh to file/dir/link.
+ * @param type Inode type.
+ * @ref EXT4_DIRENTRY_UNKNOWN
+ * @ref EXT4_DE_REG_FILE
+ * @ref EXT4_DE_DIR
+ * @ref EXT4_DE_CHRDEV
+ * @ref EXT4_DE_BLKDEV
+ * @ref EXT4_DE_FIFO
+ * @ref EXT4_DE_SOCK
+ * @ref EXT4_DE_SYMLINK
+ *
+ * @return Standard error code.*/
+int ext4_inode_exist(const char *path, int type);
+
/**@brief Change file/directory/link mode bits.
*
* @param path Path to file/dir/link.