* \{
*/
//! Open for execution
-#define VFS_OPENFLAG_EXEC 0x01
+#define VFS_OPENFLAG_EXEC 0x001
//! Open for reading
-#define VFS_OPENFLAG_READ 0x02
+#define VFS_OPENFLAG_READ 0x002
//! Open for writing
-#define VFS_OPENFLAG_WRITE 0x04
+#define VFS_OPENFLAG_WRITE 0x004
//! Do not resolve the final symbolic link
-#define VFS_OPENFLAG_NOLINK 0x40
+#define VFS_OPENFLAG_NOLINK 0x040
//! Create the file if it doesn't exist
-#define VFS_OPENFLAG_CREATE 0x80
+#define VFS_OPENFLAG_CREATE 0x080
+//! Open file as non-blocking
+#define VFS_OPENFLAG_NONBLOCK 0x100
//! Treat as a directory
-#define VFS_OPENFLAG_DIRECTORY 0x100
+#define VFS_OPENFLAG_DIRECTORY 0x1000
//! Open as a user
#define VFS_OPENFLAG_USER 0x8000
/**
*/
extern int VFS_OpenInode(Uint32 Mount, Uint64 Inode, int Mode);
+/**
+ * \brief Open a file reusing an old FD
+ */
+extern int VFS_Reopen(int FD, const char *Path, int Flags);
+
/**
* \brief Close a currently open file
* \param FD Handle returned by ::VFS_Open
*/
extern void VFS_Close(int FD);
+/**
+ * \brief Copy one FD to another
+ * \param SrcFD Source file descriptor
+ * \param DstFD Destination file descriptor (-1 means allocate new)
+ */
+extern int VFS_DuplicateFD(int SrcFD, int DstFD);
+
+/**
+ * \brief Update the flags on a FD
+ */
+extern int VFS_SetFDFlags(int FD, int Mask, int Value);
+
/**
* \brief Get file information from an open file
* \param FD File handle returned by ::VFS_Open