Tao.PhysFs SDK Documentation

Fs.PHYSFS_setWriteDir Method 

Tell PhysicsFS where it may write files.

[Visual Basic]
Public Shared Function PHYSFS_setWriteDir( _
   ByVal newDir As String _
) As Integer
[C#]
public static int PHYSFS_setWriteDir(
   string newDir
);

Parameters

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 Value

non-zero on success, zero on failure. All attempts to open a file for writing via PhysicsFS will fail until this call succeeds. Specifics of the error can be gleaned from PHYSFS_getLastError().

Remarks

Set a new write dir. This will override the previous setting. If the directory or a parent directory doesn't exist in the physical filesystem, PhysicsFS will attempt to create them as needed.

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

See Also

Fs Class | Tao.PhysFs Namespace | PHYSFS_getWriteDir