typedef Uint32 tMount;
// === CONSTANTS ===
+//! Maximum length of a filename (including NULL byte)
#define FILENAME_MAX 256
//! Maximum size of a Memory Path generated by VFS_GetMemPath
#define VFS_MEMPATH_SIZE (3 + (BITS/4)*2)
//! Create the file if it doesn't exist
#define VFS_OPENFLAG_CREATE 0x80
//! Treat as a directory
-#define VFS_OPENFLAG_DIRECTORY 0x100
+#define VFS_OPENFLAG_DIRECTORY 0x1000
//! Open as a user
#define VFS_OPENFLAG_USER 0x8000
/**
*/
typedef struct sVFS_ACL
{
+ //! ACL entity selection
struct {
unsigned Group: 1; //!< Group (as opposed to user) flag
unsigned ID: 31; //!< ID of Group/User (-1 for nobody/world)
- };
+ } Ent;
+ //! ACL Permissions mask
struct {
unsigned Inv: 1; //!< Invert Permissions
unsigned Perms: 31; //!< Permission Flags
- };
+ } Perm;
} tVFS_ACL;
/**
*/
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