#define VFS_OPENFLAG_WRITE 0x04
//! Do not resolve the final symbolic link
#define VFS_OPENFLAG_NOLINK 0x40
+//! Create the file if it doesn't exist
+#define VFS_OPENFLAG_CREATE 0x80
//! Open as a user
-#define VFS_OPENFLAG_USER 0x80
+#define VFS_OPENFLAG_USER 0x8000
/**
* \}
*/
/**
* \brief Open a file
* \param Path Absolute or relative path to the file
- * \param Mode Flags defining how to open the file
+ * \param Flags Flags defining how to open the file
* \return VFS Handle (an integer) or -1 if an error occured
+ * \note Calls VFS_OpenEx(Path, Flags, 0)
*/
-extern int VFS_Open(const char *Path, Uint Mode);
+extern int VFS_Open(const char *Path, Uint Flags);
+/**
+ * \brief Open a file
+ * \param Path Absolute or relative path to the file
+ * \param Flags Flags defining how to open the file
+ * \param Mode Mode for newly created file (POSIX compatability)
+ * \return VFS Handle (an integer) or -1 if an error occured
+ */
+extern int VFS_OpenEx(const char *Path, Uint Flags, Uint Mode);
/**
* \brief Opens a file via an open directory
* \note The file to open must be a direct child of the parent