Function physfs_sys::PHYSFS_setWriteDir[][src]

pub unsafe extern "C" fn PHYSFS_setWriteDir(
    newDir: *const c_char
) -> c_int
Expand description

\fn int PHYSFS_setWriteDir(const char *newDir) \brief Tell PhysicsFS where it may write files.

Set a new write dir. This will override the previous setting.

This call will fail (and fail to change the write dir) if the current write dir still has files open in it.

\param newDir The new directory to be the root of the write dir, specified in platform-dependent notation. Setting to NULL disables the write dir, so no files can be opened for writing via PhysicsFS. \return non-zero on success, zero on failure. All attempts to open a file for writing via PhysicsFS will fail until this call succeeds. Use PHYSFS_getLastErrorCode() to obtain the specific error.

\sa PHYSFS_getWriteDir