Fix a compile issue with big endian config & some small issues fixes
[lwext4.git] / include / ext4.h
index f74efb6935697957540679ae6a9c4c8b7c81e529..36944100c0e9d9b11df208012f7fd3a8d8328a1e 100644 (file)
@@ -45,13 +45,13 @@ extern "C" {
 #include <stdint.h>
 #include <stddef.h>
 
-#include "ext4_config.h"
-#include "ext4_types.h"
-#include "ext4_errno.h"
-#include "ext4_oflags.h"
-#include "ext4_debug.h"
+#include <ext4_config.h>
+#include <ext4_types.h>
+#include <ext4_errno.h>
+#include <ext4_oflags.h>
+#include <ext4_debug.h>
 
-#include "ext4_blockdev.h"
+#include <ext4_blockdev.h>
 
 /********************************OS LOCK INFERFACE***************************/
 
@@ -227,13 +227,13 @@ int ext4_get_sblock(const char *mount_point, struct ext4_sblock **sb);
  * @warning Default model of cache is write trough. It means that when You do:
  *
  *          ext4_fopen(...);
- *          ext4_fwrie(...);
+ *          ext4_fwrite(...);
  *                           < --- data is flushed to physical drive
  *
  *          When you do:
  *          ext4_cache_write_back(..., 1);
  *          ext4_fopen(...);
- *          ext4_fwrie(...);
+ *          ext4_fwrite(...);
  *                           < --- data is NOT flushed to physical drive
  *          ext4_cache_write_back(..., 0);
  *                           < --- when write back mode is disabled all
@@ -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.