Tao.PhysFs SDK Documentation

Fs.PHYSFS_getRealDir Method 

Figure out where in the search path a file resides.

[Visual Basic]
Public Shared Function PHYSFS_getRealDir( _
   ByVal filename As String _
) As String
[C#]
public static string PHYSFS_getRealDir(
   string filename
);

Parameters

filename
file to look for.

Return Value

string of element of search path containing the the file in question. NULL if not found.

Remarks

The file is specified in platform-independent notation. The returned filename will be the element of the search path where the file was found, which may be a directory, or an archive. Even if there are multiple matches in different parts of the search path, only the first one found is used, just like when opening a file.

So, if you look for "maps/level1.map", and C:\mygame is in your search path and C:\mygame\maps\level1.map exists, then "C:\mygame" is returned.

If a any part of a match is a symbolic link, and you've not explicitly permitted symlinks, then it will be ignored, and the search for a match will continue.

See Also

Fs Class | Tao.PhysFs Namespace