\section{physfs.\+h File Reference}
\label{physfs_8h}\index{physfs.\+h@{physfs.\+h}}
\subsection*{Data Structures}
\begin{DoxyCompactItemize}
\item 
struct \textbf{ P\+H\+Y\+S\+F\+S\+\_\+\+File}
\begin{DoxyCompactList}\small\item\em A Physics\+FS file handle. \end{DoxyCompactList}\item 
struct \textbf{ P\+H\+Y\+S\+F\+S\+\_\+\+Archive\+Info}
\begin{DoxyCompactList}\small\item\em Information on various Physics\+F\+S-\/supported archives. \end{DoxyCompactList}\item 
struct \textbf{ P\+H\+Y\+S\+F\+S\+\_\+\+Version}
\begin{DoxyCompactList}\small\item\em Information the version of Physics\+FS in use. \end{DoxyCompactList}\item 
struct \textbf{ P\+H\+Y\+S\+F\+S\+\_\+\+Allocator}
\begin{DoxyCompactList}\small\item\em Physics\+FS allocation function pointers. \end{DoxyCompactList}\item 
struct \textbf{ P\+H\+Y\+S\+F\+S\+\_\+\+Stat}
\begin{DoxyCompactList}\small\item\em Meta data for a file or directory. \end{DoxyCompactList}\item 
struct \textbf{ P\+H\+Y\+S\+F\+S\+\_\+\+Io}
\begin{DoxyCompactList}\small\item\em An abstract i/o interface. \end{DoxyCompactList}\item 
struct \textbf{ P\+H\+Y\+S\+F\+S\+\_\+\+Archiver}
\begin{DoxyCompactList}\small\item\em Abstract interface to provide support for user-\/defined archives. \end{DoxyCompactList}\end{DoxyCompactItemize}
\subsection*{Macros}
\begin{DoxyCompactItemize}
\item 
\#define \textbf{ P\+H\+Y\+S\+F\+S\+\_\+file}~\textbf{ P\+H\+Y\+S\+F\+S\+\_\+\+File}
\begin{DoxyCompactList}\small\item\em 1.\+0 A\+PI compatibility define. \end{DoxyCompactList}\item 
\#define \textbf{ P\+H\+Y\+S\+F\+S\+\_\+\+V\+E\+R\+S\+I\+ON}(x)
\begin{DoxyCompactList}\small\item\em Macro to determine Physics\+FS version program was compiled against. \end{DoxyCompactList}\end{DoxyCompactItemize}
\subsection*{Typedefs}
\begin{DoxyCompactItemize}
\item 
\mbox{\label{physfs_8h_abb348466106a912e03cf63f494a30356}} 
typedef unsigned char \textbf{ P\+H\+Y\+S\+F\+S\+\_\+uint8}
\begin{DoxyCompactList}\small\item\em An unsigned, 8-\/bit integer type. \end{DoxyCompactList}\item 
\mbox{\label{physfs_8h_a76505754bb5c7f8f5e964e1a4d1a2571}} 
typedef signed char \textbf{ P\+H\+Y\+S\+F\+S\+\_\+sint8}
\begin{DoxyCompactList}\small\item\em A signed, 8-\/bit integer type. \end{DoxyCompactList}\item 
\mbox{\label{physfs_8h_ac4d1c74e276b04ef993530a405553574}} 
typedef unsigned short \textbf{ P\+H\+Y\+S\+F\+S\+\_\+uint16}
\begin{DoxyCompactList}\small\item\em An unsigned, 16-\/bit integer type. \end{DoxyCompactList}\item 
\mbox{\label{physfs_8h_aeed97311e1294c0b42648f99d331e5a0}} 
typedef signed short \textbf{ P\+H\+Y\+S\+F\+S\+\_\+sint16}
\begin{DoxyCompactList}\small\item\em A signed, 16-\/bit integer type. \end{DoxyCompactList}\item 
\mbox{\label{physfs_8h_aae011b45ebd619edb193fe196e1f5f74}} 
typedef unsigned int \textbf{ P\+H\+Y\+S\+F\+S\+\_\+uint32}
\begin{DoxyCompactList}\small\item\em An unsigned, 32-\/bit integer type. \end{DoxyCompactList}\item 
\mbox{\label{physfs_8h_ae0264996863470a315e29d5a740a0f36}} 
typedef signed int \textbf{ P\+H\+Y\+S\+F\+S\+\_\+sint32}
\begin{DoxyCompactList}\small\item\em A signed, 32-\/bit integer type. \end{DoxyCompactList}\item 
typedef unsigned long long \textbf{ P\+H\+Y\+S\+F\+S\+\_\+uint64}
\begin{DoxyCompactList}\small\item\em An unsigned, 64-\/bit integer type. \end{DoxyCompactList}\item 
typedef signed long long \textbf{ P\+H\+Y\+S\+F\+S\+\_\+sint64}
\begin{DoxyCompactList}\small\item\em A signed, 64-\/bit integer type. \end{DoxyCompactList}\item 
\mbox{\label{physfs_8h_ac508755db9ce6adc2c77bc7637066439}} 
typedef struct \textbf{ P\+H\+Y\+S\+F\+S\+\_\+\+File} {\bfseries P\+H\+Y\+S\+F\+S\+\_\+\+File}
\item 
\mbox{\label{physfs_8h_af769bf94ebb564e044a3cfdd47201346}} 
typedef struct \textbf{ P\+H\+Y\+S\+F\+S\+\_\+\+Archive\+Info} {\bfseries P\+H\+Y\+S\+F\+S\+\_\+\+Archive\+Info}
\item 
\mbox{\label{physfs_8h_acabe0a2df67a5981d3bf043092dce5c2}} 
typedef struct \textbf{ P\+H\+Y\+S\+F\+S\+\_\+\+Version} {\bfseries P\+H\+Y\+S\+F\+S\+\_\+\+Version}
\item 
\mbox{\label{physfs_8h_a54199cc60c31722974c3072a42371c91}} 
typedef struct \textbf{ P\+H\+Y\+S\+F\+S\+\_\+\+Allocator} {\bfseries P\+H\+Y\+S\+F\+S\+\_\+\+Allocator}
\item 
typedef void($\ast$ \textbf{ P\+H\+Y\+S\+F\+S\+\_\+\+String\+Callback}) (void $\ast$data, const char $\ast$str)
\begin{DoxyCompactList}\small\item\em Function signature for callbacks that report strings. \end{DoxyCompactList}\item 
typedef void($\ast$ \textbf{ P\+H\+Y\+S\+F\+S\+\_\+\+Enum\+Files\+Callback}) (void $\ast$data, const char $\ast$origdir, const char $\ast$fname)
\begin{DoxyCompactList}\small\item\em Function signature for callbacks that enumerate files. \end{DoxyCompactList}\item 
\mbox{\label{physfs_8h_a21b82ae13e4f7290f140578827a74364}} 
typedef enum \textbf{ P\+H\+Y\+S\+F\+S\+\_\+\+Enumerate\+Callback\+Result} {\bfseries P\+H\+Y\+S\+F\+S\+\_\+\+Enumerate\+Callback\+Result}
\item 
typedef \textbf{ P\+H\+Y\+S\+F\+S\+\_\+\+Enumerate\+Callback\+Result}($\ast$ \textbf{ P\+H\+Y\+S\+F\+S\+\_\+\+Enumerate\+Callback}) (void $\ast$data, const char $\ast$origdir, const char $\ast$fname)
\begin{DoxyCompactList}\small\item\em Possible return values from P\+H\+Y\+S\+F\+S\+\_\+\+Enumerate\+Callback. \end{DoxyCompactList}\item 
\mbox{\label{physfs_8h_a15c42d20dc140b7720d8819d38e38602}} 
typedef enum \textbf{ P\+H\+Y\+S\+F\+S\+\_\+\+File\+Type} {\bfseries P\+H\+Y\+S\+F\+S\+\_\+\+File\+Type}
\item 
\mbox{\label{physfs_8h_a608b78654a13671449bd44b9431f4332}} 
typedef struct \textbf{ P\+H\+Y\+S\+F\+S\+\_\+\+Stat} {\bfseries P\+H\+Y\+S\+F\+S\+\_\+\+Stat}
\item 
\mbox{\label{physfs_8h_a9c0343a5ea04d14bc28023e076dfa0b1}} 
typedef struct \textbf{ P\+H\+Y\+S\+F\+S\+\_\+\+Io} {\bfseries P\+H\+Y\+S\+F\+S\+\_\+\+Io}
\item 
\mbox{\label{physfs_8h_a5af16561a2a27877d48dfb9c78933c3f}} 
typedef enum \textbf{ P\+H\+Y\+S\+F\+S\+\_\+\+Error\+Code} {\bfseries P\+H\+Y\+S\+F\+S\+\_\+\+Error\+Code}
\item 
\mbox{\label{physfs_8h_a4eefce50d72ca7d0783b6a88a5d8866b}} 
typedef struct \textbf{ P\+H\+Y\+S\+F\+S\+\_\+\+Archiver} {\bfseries P\+H\+Y\+S\+F\+S\+\_\+\+Archiver}
\end{DoxyCompactItemize}
\subsection*{Enumerations}
\begin{DoxyCompactItemize}
\item 
enum \textbf{ P\+H\+Y\+S\+F\+S\+\_\+\+Enumerate\+Callback\+Result} \{ \textbf{ P\+H\+Y\+S\+F\+S\+\_\+\+E\+N\+U\+M\+\_\+\+E\+R\+R\+OR} = -\/1, 
\textbf{ P\+H\+Y\+S\+F\+S\+\_\+\+E\+N\+U\+M\+\_\+\+S\+T\+OP} = 0, 
\textbf{ P\+H\+Y\+S\+F\+S\+\_\+\+E\+N\+U\+M\+\_\+\+OK} = 1
 \}
\item 
enum \textbf{ P\+H\+Y\+S\+F\+S\+\_\+\+File\+Type} \{ \textbf{ P\+H\+Y\+S\+F\+S\+\_\+\+F\+I\+L\+E\+T\+Y\+P\+E\+\_\+\+R\+E\+G\+U\+L\+AR}, 
\textbf{ P\+H\+Y\+S\+F\+S\+\_\+\+F\+I\+L\+E\+T\+Y\+P\+E\+\_\+\+D\+I\+R\+E\+C\+T\+O\+RY}, 
\textbf{ P\+H\+Y\+S\+F\+S\+\_\+\+F\+I\+L\+E\+T\+Y\+P\+E\+\_\+\+S\+Y\+M\+L\+I\+NK}, 
\textbf{ P\+H\+Y\+S\+F\+S\+\_\+\+F\+I\+L\+E\+T\+Y\+P\+E\+\_\+\+O\+T\+H\+ER}
 \}\begin{DoxyCompactList}\small\item\em Type of a File. \end{DoxyCompactList}
\item 
enum \textbf{ P\+H\+Y\+S\+F\+S\+\_\+\+Error\+Code} \{ \newline
\textbf{ P\+H\+Y\+S\+F\+S\+\_\+\+E\+R\+R\+\_\+\+OK}, 
\textbf{ P\+H\+Y\+S\+F\+S\+\_\+\+E\+R\+R\+\_\+\+O\+T\+H\+E\+R\+\_\+\+E\+R\+R\+OR}, 
\textbf{ P\+H\+Y\+S\+F\+S\+\_\+\+E\+R\+R\+\_\+\+O\+U\+T\+\_\+\+O\+F\+\_\+\+M\+E\+M\+O\+RY}, 
\textbf{ P\+H\+Y\+S\+F\+S\+\_\+\+E\+R\+R\+\_\+\+N\+O\+T\+\_\+\+I\+N\+I\+T\+I\+A\+L\+I\+Z\+ED}, 
\newline
\textbf{ P\+H\+Y\+S\+F\+S\+\_\+\+E\+R\+R\+\_\+\+I\+S\+\_\+\+I\+N\+I\+T\+I\+A\+L\+I\+Z\+ED}, 
\textbf{ P\+H\+Y\+S\+F\+S\+\_\+\+E\+R\+R\+\_\+\+A\+R\+G\+V0\+\_\+\+I\+S\+\_\+\+N\+U\+LL}, 
\textbf{ P\+H\+Y\+S\+F\+S\+\_\+\+E\+R\+R\+\_\+\+U\+N\+S\+U\+P\+P\+O\+R\+T\+ED}, 
\textbf{ P\+H\+Y\+S\+F\+S\+\_\+\+E\+R\+R\+\_\+\+P\+A\+S\+T\+\_\+\+E\+OF}, 
\newline
\textbf{ P\+H\+Y\+S\+F\+S\+\_\+\+E\+R\+R\+\_\+\+F\+I\+L\+E\+S\+\_\+\+S\+T\+I\+L\+L\+\_\+\+O\+P\+EN}, 
\textbf{ P\+H\+Y\+S\+F\+S\+\_\+\+E\+R\+R\+\_\+\+I\+N\+V\+A\+L\+I\+D\+\_\+\+A\+R\+G\+U\+M\+E\+NT}, 
\textbf{ P\+H\+Y\+S\+F\+S\+\_\+\+E\+R\+R\+\_\+\+N\+O\+T\+\_\+\+M\+O\+U\+N\+T\+ED}, 
\textbf{ P\+H\+Y\+S\+F\+S\+\_\+\+E\+R\+R\+\_\+\+N\+O\+T\+\_\+\+F\+O\+U\+ND}, 
\newline
\textbf{ P\+H\+Y\+S\+F\+S\+\_\+\+E\+R\+R\+\_\+\+S\+Y\+M\+L\+I\+N\+K\+\_\+\+F\+O\+R\+B\+I\+D\+D\+EN}, 
\textbf{ P\+H\+Y\+S\+F\+S\+\_\+\+E\+R\+R\+\_\+\+N\+O\+\_\+\+W\+R\+I\+T\+E\+\_\+\+D\+IR}, 
\textbf{ P\+H\+Y\+S\+F\+S\+\_\+\+E\+R\+R\+\_\+\+O\+P\+E\+N\+\_\+\+F\+O\+R\+\_\+\+R\+E\+A\+D\+I\+NG}, 
\textbf{ P\+H\+Y\+S\+F\+S\+\_\+\+E\+R\+R\+\_\+\+O\+P\+E\+N\+\_\+\+F\+O\+R\+\_\+\+W\+R\+I\+T\+I\+NG}, 
\newline
\textbf{ P\+H\+Y\+S\+F\+S\+\_\+\+E\+R\+R\+\_\+\+N\+O\+T\+\_\+\+A\+\_\+\+F\+I\+LE}, 
\textbf{ P\+H\+Y\+S\+F\+S\+\_\+\+E\+R\+R\+\_\+\+R\+E\+A\+D\+\_\+\+O\+N\+LY}, 
\textbf{ P\+H\+Y\+S\+F\+S\+\_\+\+E\+R\+R\+\_\+\+C\+O\+R\+R\+U\+PT}, 
\textbf{ P\+H\+Y\+S\+F\+S\+\_\+\+E\+R\+R\+\_\+\+S\+Y\+M\+L\+I\+N\+K\+\_\+\+L\+O\+OP}, 
\newline
\textbf{ P\+H\+Y\+S\+F\+S\+\_\+\+E\+R\+R\+\_\+\+IO}, 
\textbf{ P\+H\+Y\+S\+F\+S\+\_\+\+E\+R\+R\+\_\+\+P\+E\+R\+M\+I\+S\+S\+I\+ON}, 
\textbf{ P\+H\+Y\+S\+F\+S\+\_\+\+E\+R\+R\+\_\+\+N\+O\+\_\+\+S\+P\+A\+CE}, 
\textbf{ P\+H\+Y\+S\+F\+S\+\_\+\+E\+R\+R\+\_\+\+B\+A\+D\+\_\+\+F\+I\+L\+E\+N\+A\+ME}, 
\newline
\textbf{ P\+H\+Y\+S\+F\+S\+\_\+\+E\+R\+R\+\_\+\+B\+U\+SY}, 
\textbf{ P\+H\+Y\+S\+F\+S\+\_\+\+E\+R\+R\+\_\+\+D\+I\+R\+\_\+\+N\+O\+T\+\_\+\+E\+M\+P\+TY}, 
\textbf{ P\+H\+Y\+S\+F\+S\+\_\+\+E\+R\+R\+\_\+\+O\+S\+\_\+\+E\+R\+R\+OR}, 
\textbf{ P\+H\+Y\+S\+F\+S\+\_\+\+E\+R\+R\+\_\+\+D\+U\+P\+L\+I\+C\+A\+TE}, 
\newline
\textbf{ P\+H\+Y\+S\+F\+S\+\_\+\+E\+R\+R\+\_\+\+B\+A\+D\+\_\+\+P\+A\+S\+S\+W\+O\+RD}, 
\textbf{ P\+H\+Y\+S\+F\+S\+\_\+\+E\+R\+R\+\_\+\+A\+P\+P\+\_\+\+C\+A\+L\+L\+B\+A\+CK}
 \}\begin{DoxyCompactList}\small\item\em Values that represent specific causes of failure. \end{DoxyCompactList}
\end{DoxyCompactItemize}
\subsection*{Functions}
\begin{DoxyCompactItemize}
\item 
void \textbf{ P\+H\+Y\+S\+F\+S\+\_\+get\+Linked\+Version} (\textbf{ P\+H\+Y\+S\+F\+S\+\_\+\+Version} $\ast$ver)
\begin{DoxyCompactList}\small\item\em Get the version of Physics\+FS that is linked against your program. \end{DoxyCompactList}\item 
int \textbf{ P\+H\+Y\+S\+F\+S\+\_\+init} (const char $\ast$argv0)
\begin{DoxyCompactList}\small\item\em Initialize the Physics\+FS library. \end{DoxyCompactList}\item 
int \textbf{ P\+H\+Y\+S\+F\+S\+\_\+deinit} (void)
\begin{DoxyCompactList}\small\item\em Deinitialize the Physics\+FS library. \end{DoxyCompactList}\item 
const \textbf{ P\+H\+Y\+S\+F\+S\+\_\+\+Archive\+Info} $\ast$$\ast$ \textbf{ P\+H\+Y\+S\+F\+S\+\_\+supported\+Archive\+Types} (void)
\begin{DoxyCompactList}\small\item\em Get a list of supported archive types. \end{DoxyCompactList}\item 
void \textbf{ P\+H\+Y\+S\+F\+S\+\_\+free\+List} (void $\ast$list\+Var)
\begin{DoxyCompactList}\small\item\em Deallocate resources of lists returned by Physics\+FS. \end{DoxyCompactList}\item 
const char $\ast$ \textbf{ P\+H\+Y\+S\+F\+S\+\_\+get\+Last\+Error} (void)
\begin{DoxyCompactList}\small\item\em Get human-\/readable error information. \end{DoxyCompactList}\item 
const char $\ast$ \textbf{ P\+H\+Y\+S\+F\+S\+\_\+get\+Dir\+Separator} (void)
\begin{DoxyCompactList}\small\item\em Get platform-\/dependent dir separator string. \end{DoxyCompactList}\item 
void \textbf{ P\+H\+Y\+S\+F\+S\+\_\+permit\+Symbolic\+Links} (int allow)
\begin{DoxyCompactList}\small\item\em Enable or disable following of symbolic links. \end{DoxyCompactList}\item 
char $\ast$$\ast$ \textbf{ P\+H\+Y\+S\+F\+S\+\_\+get\+Cd\+Rom\+Dirs} (void)
\begin{DoxyCompactList}\small\item\em Get an array of paths to available C\+D-\/\+R\+OM drives. \end{DoxyCompactList}\item 
const char $\ast$ \textbf{ P\+H\+Y\+S\+F\+S\+\_\+get\+Base\+Dir} (void)
\begin{DoxyCompactList}\small\item\em Get the path where the application resides. \end{DoxyCompactList}\item 
const char $\ast$ \textbf{ P\+H\+Y\+S\+F\+S\+\_\+get\+User\+Dir} (void)
\begin{DoxyCompactList}\small\item\em Get the path where user\textquotesingle{}s home directory resides. \end{DoxyCompactList}\item 
const char $\ast$ \textbf{ P\+H\+Y\+S\+F\+S\+\_\+get\+Write\+Dir} (void)
\begin{DoxyCompactList}\small\item\em Get path where Physics\+FS will allow file writing. \end{DoxyCompactList}\item 
int \textbf{ P\+H\+Y\+S\+F\+S\+\_\+set\+Write\+Dir} (const char $\ast$new\+Dir)
\begin{DoxyCompactList}\small\item\em Tell Physics\+FS where it may write files. \end{DoxyCompactList}\item 
int \textbf{ P\+H\+Y\+S\+F\+S\+\_\+add\+To\+Search\+Path} (const char $\ast$new\+Dir, int append\+To\+Path)
\begin{DoxyCompactList}\small\item\em Add an archive or directory to the search path. \end{DoxyCompactList}\item 
int \textbf{ P\+H\+Y\+S\+F\+S\+\_\+remove\+From\+Search\+Path} (const char $\ast$old\+Dir)
\begin{DoxyCompactList}\small\item\em Remove a directory or archive from the search path. \end{DoxyCompactList}\item 
char $\ast$$\ast$ \textbf{ P\+H\+Y\+S\+F\+S\+\_\+get\+Search\+Path} (void)
\begin{DoxyCompactList}\small\item\em Get the current search path. \end{DoxyCompactList}\item 
int \textbf{ P\+H\+Y\+S\+F\+S\+\_\+set\+Sane\+Config} (const char $\ast$organization, const char $\ast$app\+Name, const char $\ast$archive\+Ext, int include\+Cd\+Roms, int archives\+First)
\begin{DoxyCompactList}\small\item\em Set up sane, default paths. \end{DoxyCompactList}\item 
int \textbf{ P\+H\+Y\+S\+F\+S\+\_\+mkdir} (const char $\ast$dir\+Name)
\begin{DoxyCompactList}\small\item\em Create a directory. \end{DoxyCompactList}\item 
int \textbf{ P\+H\+Y\+S\+F\+S\+\_\+delete} (const char $\ast$filename)
\begin{DoxyCompactList}\small\item\em Delete a file or directory. \end{DoxyCompactList}\item 
const char $\ast$ \textbf{ P\+H\+Y\+S\+F\+S\+\_\+get\+Real\+Dir} (const char $\ast$filename)
\begin{DoxyCompactList}\small\item\em Figure out where in the search path a file resides. \end{DoxyCompactList}\item 
char $\ast$$\ast$ \textbf{ P\+H\+Y\+S\+F\+S\+\_\+enumerate\+Files} (const char $\ast$dir)
\begin{DoxyCompactList}\small\item\em Get a file listing of a search path\textquotesingle{}s directory. \end{DoxyCompactList}\item 
int \textbf{ P\+H\+Y\+S\+F\+S\+\_\+exists} (const char $\ast$fname)
\begin{DoxyCompactList}\small\item\em Determine if a file exists in the search path. \end{DoxyCompactList}\item 
int \textbf{ P\+H\+Y\+S\+F\+S\+\_\+is\+Directory} (const char $\ast$fname)
\begin{DoxyCompactList}\small\item\em Determine if a file in the search path is really a directory. \end{DoxyCompactList}\item 
int \textbf{ P\+H\+Y\+S\+F\+S\+\_\+is\+Symbolic\+Link} (const char $\ast$fname)
\begin{DoxyCompactList}\small\item\em Determine if a file in the search path is really a symbolic link. \end{DoxyCompactList}\item 
\textbf{ P\+H\+Y\+S\+F\+S\+\_\+sint64} \textbf{ P\+H\+Y\+S\+F\+S\+\_\+get\+Last\+Mod\+Time} (const char $\ast$filename)
\begin{DoxyCompactList}\small\item\em Get the last modification time of a file. \end{DoxyCompactList}\item 
\textbf{ P\+H\+Y\+S\+F\+S\+\_\+\+File} $\ast$ \textbf{ P\+H\+Y\+S\+F\+S\+\_\+open\+Write} (const char $\ast$filename)
\begin{DoxyCompactList}\small\item\em Open a file for writing. \end{DoxyCompactList}\item 
\textbf{ P\+H\+Y\+S\+F\+S\+\_\+\+File} $\ast$ \textbf{ P\+H\+Y\+S\+F\+S\+\_\+open\+Append} (const char $\ast$filename)
\begin{DoxyCompactList}\small\item\em Open a file for appending. \end{DoxyCompactList}\item 
\textbf{ P\+H\+Y\+S\+F\+S\+\_\+\+File} $\ast$ \textbf{ P\+H\+Y\+S\+F\+S\+\_\+open\+Read} (const char $\ast$filename)
\begin{DoxyCompactList}\small\item\em Open a file for reading. \end{DoxyCompactList}\item 
int \textbf{ P\+H\+Y\+S\+F\+S\+\_\+close} (\textbf{ P\+H\+Y\+S\+F\+S\+\_\+\+File} $\ast$handle)
\begin{DoxyCompactList}\small\item\em Close a Physics\+FS filehandle. \end{DoxyCompactList}\item 
\textbf{ P\+H\+Y\+S\+F\+S\+\_\+sint64} \textbf{ P\+H\+Y\+S\+F\+S\+\_\+read} (\textbf{ P\+H\+Y\+S\+F\+S\+\_\+\+File} $\ast$handle, void $\ast$buffer, \textbf{ P\+H\+Y\+S\+F\+S\+\_\+uint32} obj\+Size, \textbf{ P\+H\+Y\+S\+F\+S\+\_\+uint32} obj\+Count)
\begin{DoxyCompactList}\small\item\em Read data from a Physics\+FS filehandle. \end{DoxyCompactList}\item 
\textbf{ P\+H\+Y\+S\+F\+S\+\_\+sint64} \textbf{ P\+H\+Y\+S\+F\+S\+\_\+write} (\textbf{ P\+H\+Y\+S\+F\+S\+\_\+\+File} $\ast$handle, const void $\ast$buffer, \textbf{ P\+H\+Y\+S\+F\+S\+\_\+uint32} obj\+Size, \textbf{ P\+H\+Y\+S\+F\+S\+\_\+uint32} obj\+Count)
\begin{DoxyCompactList}\small\item\em Write data to a Physics\+FS filehandle. \end{DoxyCompactList}\item 
int \textbf{ P\+H\+Y\+S\+F\+S\+\_\+eof} (\textbf{ P\+H\+Y\+S\+F\+S\+\_\+\+File} $\ast$handle)
\begin{DoxyCompactList}\small\item\em Check for end-\/of-\/file state on a Physics\+FS filehandle. \end{DoxyCompactList}\item 
\textbf{ P\+H\+Y\+S\+F\+S\+\_\+sint64} \textbf{ P\+H\+Y\+S\+F\+S\+\_\+tell} (\textbf{ P\+H\+Y\+S\+F\+S\+\_\+\+File} $\ast$handle)
\begin{DoxyCompactList}\small\item\em Determine current position within a Physics\+FS filehandle. \end{DoxyCompactList}\item 
int \textbf{ P\+H\+Y\+S\+F\+S\+\_\+seek} (\textbf{ P\+H\+Y\+S\+F\+S\+\_\+\+File} $\ast$handle, \textbf{ P\+H\+Y\+S\+F\+S\+\_\+uint64} pos)
\begin{DoxyCompactList}\small\item\em Seek to a new position within a Physics\+FS filehandle. \end{DoxyCompactList}\item 
\textbf{ P\+H\+Y\+S\+F\+S\+\_\+sint64} \textbf{ P\+H\+Y\+S\+F\+S\+\_\+file\+Length} (\textbf{ P\+H\+Y\+S\+F\+S\+\_\+\+File} $\ast$handle)
\begin{DoxyCompactList}\small\item\em Get total length of a file in bytes. \end{DoxyCompactList}\item 
int \textbf{ P\+H\+Y\+S\+F\+S\+\_\+set\+Buffer} (\textbf{ P\+H\+Y\+S\+F\+S\+\_\+\+File} $\ast$handle, \textbf{ P\+H\+Y\+S\+F\+S\+\_\+uint64} bufsize)
\begin{DoxyCompactList}\small\item\em Set up buffering for a Physics\+FS file handle. \end{DoxyCompactList}\item 
int \textbf{ P\+H\+Y\+S\+F\+S\+\_\+flush} (\textbf{ P\+H\+Y\+S\+F\+S\+\_\+\+File} $\ast$handle)
\begin{DoxyCompactList}\small\item\em Flush a buffered Physics\+FS file handle. \end{DoxyCompactList}\item 
\textbf{ P\+H\+Y\+S\+F\+S\+\_\+sint16} \textbf{ P\+H\+Y\+S\+F\+S\+\_\+swap\+S\+L\+E16} (\textbf{ P\+H\+Y\+S\+F\+S\+\_\+sint16} val)
\begin{DoxyCompactList}\small\item\em Swap littleendian signed 16 to platform\textquotesingle{}s native byte order. \end{DoxyCompactList}\item 
\textbf{ P\+H\+Y\+S\+F\+S\+\_\+uint16} \textbf{ P\+H\+Y\+S\+F\+S\+\_\+swap\+U\+L\+E16} (\textbf{ P\+H\+Y\+S\+F\+S\+\_\+uint16} val)
\begin{DoxyCompactList}\small\item\em Swap littleendian unsigned 16 to platform\textquotesingle{}s native byte order. \end{DoxyCompactList}\item 
\textbf{ P\+H\+Y\+S\+F\+S\+\_\+sint32} \textbf{ P\+H\+Y\+S\+F\+S\+\_\+swap\+S\+L\+E32} (\textbf{ P\+H\+Y\+S\+F\+S\+\_\+sint32} val)
\begin{DoxyCompactList}\small\item\em Swap littleendian signed 32 to platform\textquotesingle{}s native byte order. \end{DoxyCompactList}\item 
\textbf{ P\+H\+Y\+S\+F\+S\+\_\+uint32} \textbf{ P\+H\+Y\+S\+F\+S\+\_\+swap\+U\+L\+E32} (\textbf{ P\+H\+Y\+S\+F\+S\+\_\+uint32} val)
\begin{DoxyCompactList}\small\item\em Swap littleendian unsigned 32 to platform\textquotesingle{}s native byte order. \end{DoxyCompactList}\item 
\textbf{ P\+H\+Y\+S\+F\+S\+\_\+sint64} \textbf{ P\+H\+Y\+S\+F\+S\+\_\+swap\+S\+L\+E64} (\textbf{ P\+H\+Y\+S\+F\+S\+\_\+sint64} val)
\begin{DoxyCompactList}\small\item\em Swap littleendian signed 64 to platform\textquotesingle{}s native byte order. \end{DoxyCompactList}\item 
\textbf{ P\+H\+Y\+S\+F\+S\+\_\+uint64} \textbf{ P\+H\+Y\+S\+F\+S\+\_\+swap\+U\+L\+E64} (\textbf{ P\+H\+Y\+S\+F\+S\+\_\+uint64} val)
\begin{DoxyCompactList}\small\item\em Swap littleendian unsigned 64 to platform\textquotesingle{}s native byte order. \end{DoxyCompactList}\item 
\textbf{ P\+H\+Y\+S\+F\+S\+\_\+sint16} \textbf{ P\+H\+Y\+S\+F\+S\+\_\+swap\+S\+B\+E16} (\textbf{ P\+H\+Y\+S\+F\+S\+\_\+sint16} val)
\begin{DoxyCompactList}\small\item\em Swap bigendian signed 16 to platform\textquotesingle{}s native byte order. \end{DoxyCompactList}\item 
\textbf{ P\+H\+Y\+S\+F\+S\+\_\+uint16} \textbf{ P\+H\+Y\+S\+F\+S\+\_\+swap\+U\+B\+E16} (\textbf{ P\+H\+Y\+S\+F\+S\+\_\+uint16} val)
\begin{DoxyCompactList}\small\item\em Swap bigendian unsigned 16 to platform\textquotesingle{}s native byte order. \end{DoxyCompactList}\item 
\textbf{ P\+H\+Y\+S\+F\+S\+\_\+sint32} \textbf{ P\+H\+Y\+S\+F\+S\+\_\+swap\+S\+B\+E32} (\textbf{ P\+H\+Y\+S\+F\+S\+\_\+sint32} val)
\begin{DoxyCompactList}\small\item\em Swap bigendian signed 32 to platform\textquotesingle{}s native byte order. \end{DoxyCompactList}\item 
\textbf{ P\+H\+Y\+S\+F\+S\+\_\+uint32} \textbf{ P\+H\+Y\+S\+F\+S\+\_\+swap\+U\+B\+E32} (\textbf{ P\+H\+Y\+S\+F\+S\+\_\+uint32} val)
\begin{DoxyCompactList}\small\item\em Swap bigendian unsigned 32 to platform\textquotesingle{}s native byte order. \end{DoxyCompactList}\item 
\textbf{ P\+H\+Y\+S\+F\+S\+\_\+sint64} \textbf{ P\+H\+Y\+S\+F\+S\+\_\+swap\+S\+B\+E64} (\textbf{ P\+H\+Y\+S\+F\+S\+\_\+sint64} val)
\begin{DoxyCompactList}\small\item\em Swap bigendian signed 64 to platform\textquotesingle{}s native byte order. \end{DoxyCompactList}\item 
\textbf{ P\+H\+Y\+S\+F\+S\+\_\+uint64} \textbf{ P\+H\+Y\+S\+F\+S\+\_\+swap\+U\+B\+E64} (\textbf{ P\+H\+Y\+S\+F\+S\+\_\+uint64} val)
\begin{DoxyCompactList}\small\item\em Swap bigendian unsigned 64 to platform\textquotesingle{}s native byte order. \end{DoxyCompactList}\item 
int \textbf{ P\+H\+Y\+S\+F\+S\+\_\+read\+S\+L\+E16} (\textbf{ P\+H\+Y\+S\+F\+S\+\_\+\+File} $\ast$file, \textbf{ P\+H\+Y\+S\+F\+S\+\_\+sint16} $\ast$val)
\begin{DoxyCompactList}\small\item\em Read and convert a signed 16-\/bit littleendian value. \end{DoxyCompactList}\item 
int \textbf{ P\+H\+Y\+S\+F\+S\+\_\+read\+U\+L\+E16} (\textbf{ P\+H\+Y\+S\+F\+S\+\_\+\+File} $\ast$file, \textbf{ P\+H\+Y\+S\+F\+S\+\_\+uint16} $\ast$val)
\begin{DoxyCompactList}\small\item\em Read and convert an unsigned 16-\/bit littleendian value. \end{DoxyCompactList}\item 
int \textbf{ P\+H\+Y\+S\+F\+S\+\_\+read\+S\+B\+E16} (\textbf{ P\+H\+Y\+S\+F\+S\+\_\+\+File} $\ast$file, \textbf{ P\+H\+Y\+S\+F\+S\+\_\+sint16} $\ast$val)
\begin{DoxyCompactList}\small\item\em Read and convert a signed 16-\/bit bigendian value. \end{DoxyCompactList}\item 
int \textbf{ P\+H\+Y\+S\+F\+S\+\_\+read\+U\+B\+E16} (\textbf{ P\+H\+Y\+S\+F\+S\+\_\+\+File} $\ast$file, \textbf{ P\+H\+Y\+S\+F\+S\+\_\+uint16} $\ast$val)
\begin{DoxyCompactList}\small\item\em Read and convert an unsigned 16-\/bit bigendian value. \end{DoxyCompactList}\item 
int \textbf{ P\+H\+Y\+S\+F\+S\+\_\+read\+S\+L\+E32} (\textbf{ P\+H\+Y\+S\+F\+S\+\_\+\+File} $\ast$file, \textbf{ P\+H\+Y\+S\+F\+S\+\_\+sint32} $\ast$val)
\begin{DoxyCompactList}\small\item\em Read and convert a signed 32-\/bit littleendian value. \end{DoxyCompactList}\item 
int \textbf{ P\+H\+Y\+S\+F\+S\+\_\+read\+U\+L\+E32} (\textbf{ P\+H\+Y\+S\+F\+S\+\_\+\+File} $\ast$file, \textbf{ P\+H\+Y\+S\+F\+S\+\_\+uint32} $\ast$val)
\begin{DoxyCompactList}\small\item\em Read and convert an unsigned 32-\/bit littleendian value. \end{DoxyCompactList}\item 
int \textbf{ P\+H\+Y\+S\+F\+S\+\_\+read\+S\+B\+E32} (\textbf{ P\+H\+Y\+S\+F\+S\+\_\+\+File} $\ast$file, \textbf{ P\+H\+Y\+S\+F\+S\+\_\+sint32} $\ast$val)
\begin{DoxyCompactList}\small\item\em Read and convert a signed 32-\/bit bigendian value. \end{DoxyCompactList}\item 
int \textbf{ P\+H\+Y\+S\+F\+S\+\_\+read\+U\+B\+E32} (\textbf{ P\+H\+Y\+S\+F\+S\+\_\+\+File} $\ast$file, \textbf{ P\+H\+Y\+S\+F\+S\+\_\+uint32} $\ast$val)
\begin{DoxyCompactList}\small\item\em Read and convert an unsigned 32-\/bit bigendian value. \end{DoxyCompactList}\item 
int \textbf{ P\+H\+Y\+S\+F\+S\+\_\+read\+S\+L\+E64} (\textbf{ P\+H\+Y\+S\+F\+S\+\_\+\+File} $\ast$file, \textbf{ P\+H\+Y\+S\+F\+S\+\_\+sint64} $\ast$val)
\begin{DoxyCompactList}\small\item\em Read and convert a signed 64-\/bit littleendian value. \end{DoxyCompactList}\item 
int \textbf{ P\+H\+Y\+S\+F\+S\+\_\+read\+U\+L\+E64} (\textbf{ P\+H\+Y\+S\+F\+S\+\_\+\+File} $\ast$file, \textbf{ P\+H\+Y\+S\+F\+S\+\_\+uint64} $\ast$val)
\begin{DoxyCompactList}\small\item\em Read and convert an unsigned 64-\/bit littleendian value. \end{DoxyCompactList}\item 
int \textbf{ P\+H\+Y\+S\+F\+S\+\_\+read\+S\+B\+E64} (\textbf{ P\+H\+Y\+S\+F\+S\+\_\+\+File} $\ast$file, \textbf{ P\+H\+Y\+S\+F\+S\+\_\+sint64} $\ast$val)
\begin{DoxyCompactList}\small\item\em Read and convert a signed 64-\/bit bigendian value. \end{DoxyCompactList}\item 
int \textbf{ P\+H\+Y\+S\+F\+S\+\_\+read\+U\+B\+E64} (\textbf{ P\+H\+Y\+S\+F\+S\+\_\+\+File} $\ast$file, \textbf{ P\+H\+Y\+S\+F\+S\+\_\+uint64} $\ast$val)
\begin{DoxyCompactList}\small\item\em Read and convert an unsigned 64-\/bit bigendian value. \end{DoxyCompactList}\item 
int \textbf{ P\+H\+Y\+S\+F\+S\+\_\+write\+S\+L\+E16} (\textbf{ P\+H\+Y\+S\+F\+S\+\_\+\+File} $\ast$file, \textbf{ P\+H\+Y\+S\+F\+S\+\_\+sint16} val)
\begin{DoxyCompactList}\small\item\em Convert and write a signed 16-\/bit littleendian value. \end{DoxyCompactList}\item 
int \textbf{ P\+H\+Y\+S\+F\+S\+\_\+write\+U\+L\+E16} (\textbf{ P\+H\+Y\+S\+F\+S\+\_\+\+File} $\ast$file, \textbf{ P\+H\+Y\+S\+F\+S\+\_\+uint16} val)
\begin{DoxyCompactList}\small\item\em Convert and write an unsigned 16-\/bit littleendian value. \end{DoxyCompactList}\item 
int \textbf{ P\+H\+Y\+S\+F\+S\+\_\+write\+S\+B\+E16} (\textbf{ P\+H\+Y\+S\+F\+S\+\_\+\+File} $\ast$file, \textbf{ P\+H\+Y\+S\+F\+S\+\_\+sint16} val)
\begin{DoxyCompactList}\small\item\em Convert and write a signed 16-\/bit bigendian value. \end{DoxyCompactList}\item 
int \textbf{ P\+H\+Y\+S\+F\+S\+\_\+write\+U\+B\+E16} (\textbf{ P\+H\+Y\+S\+F\+S\+\_\+\+File} $\ast$file, \textbf{ P\+H\+Y\+S\+F\+S\+\_\+uint16} val)
\begin{DoxyCompactList}\small\item\em Convert and write an unsigned 16-\/bit bigendian value. \end{DoxyCompactList}\item 
int \textbf{ P\+H\+Y\+S\+F\+S\+\_\+write\+S\+L\+E32} (\textbf{ P\+H\+Y\+S\+F\+S\+\_\+\+File} $\ast$file, \textbf{ P\+H\+Y\+S\+F\+S\+\_\+sint32} val)
\begin{DoxyCompactList}\small\item\em Convert and write a signed 32-\/bit littleendian value. \end{DoxyCompactList}\item 
int \textbf{ P\+H\+Y\+S\+F\+S\+\_\+write\+U\+L\+E32} (\textbf{ P\+H\+Y\+S\+F\+S\+\_\+\+File} $\ast$file, \textbf{ P\+H\+Y\+S\+F\+S\+\_\+uint32} val)
\begin{DoxyCompactList}\small\item\em Convert and write an unsigned 32-\/bit littleendian value. \end{DoxyCompactList}\item 
int \textbf{ P\+H\+Y\+S\+F\+S\+\_\+write\+S\+B\+E32} (\textbf{ P\+H\+Y\+S\+F\+S\+\_\+\+File} $\ast$file, \textbf{ P\+H\+Y\+S\+F\+S\+\_\+sint32} val)
\begin{DoxyCompactList}\small\item\em Convert and write a signed 32-\/bit bigendian value. \end{DoxyCompactList}\item 
int \textbf{ P\+H\+Y\+S\+F\+S\+\_\+write\+U\+B\+E32} (\textbf{ P\+H\+Y\+S\+F\+S\+\_\+\+File} $\ast$file, \textbf{ P\+H\+Y\+S\+F\+S\+\_\+uint32} val)
\begin{DoxyCompactList}\small\item\em Convert and write an unsigned 32-\/bit bigendian value. \end{DoxyCompactList}\item 
int \textbf{ P\+H\+Y\+S\+F\+S\+\_\+write\+S\+L\+E64} (\textbf{ P\+H\+Y\+S\+F\+S\+\_\+\+File} $\ast$file, \textbf{ P\+H\+Y\+S\+F\+S\+\_\+sint64} val)
\begin{DoxyCompactList}\small\item\em Convert and write a signed 64-\/bit littleendian value. \end{DoxyCompactList}\item 
int \textbf{ P\+H\+Y\+S\+F\+S\+\_\+write\+U\+L\+E64} (\textbf{ P\+H\+Y\+S\+F\+S\+\_\+\+File} $\ast$file, \textbf{ P\+H\+Y\+S\+F\+S\+\_\+uint64} val)
\begin{DoxyCompactList}\small\item\em Convert and write an unsigned 64-\/bit littleendian value. \end{DoxyCompactList}\item 
int \textbf{ P\+H\+Y\+S\+F\+S\+\_\+write\+S\+B\+E64} (\textbf{ P\+H\+Y\+S\+F\+S\+\_\+\+File} $\ast$file, \textbf{ P\+H\+Y\+S\+F\+S\+\_\+sint64} val)
\begin{DoxyCompactList}\small\item\em Convert and write a signed 64-\/bit bigending value. \end{DoxyCompactList}\item 
int \textbf{ P\+H\+Y\+S\+F\+S\+\_\+write\+U\+B\+E64} (\textbf{ P\+H\+Y\+S\+F\+S\+\_\+\+File} $\ast$file, \textbf{ P\+H\+Y\+S\+F\+S\+\_\+uint64} val)
\begin{DoxyCompactList}\small\item\em Convert and write an unsigned 64-\/bit bigendian value. \end{DoxyCompactList}\item 
int \textbf{ P\+H\+Y\+S\+F\+S\+\_\+is\+Init} (void)
\begin{DoxyCompactList}\small\item\em Determine if the Physics\+FS library is initialized. \end{DoxyCompactList}\item 
int \textbf{ P\+H\+Y\+S\+F\+S\+\_\+symbolic\+Links\+Permitted} (void)
\begin{DoxyCompactList}\small\item\em Determine if the symbolic links are permitted. \end{DoxyCompactList}\item 
int \textbf{ P\+H\+Y\+S\+F\+S\+\_\+set\+Allocator} (const \textbf{ P\+H\+Y\+S\+F\+S\+\_\+\+Allocator} $\ast$allocator)
\begin{DoxyCompactList}\small\item\em Hook your own allocation routines into Physics\+FS. \end{DoxyCompactList}\item 
int \textbf{ P\+H\+Y\+S\+F\+S\+\_\+mount} (const char $\ast$new\+Dir, const char $\ast$mount\+Point, int append\+To\+Path)
\begin{DoxyCompactList}\small\item\em Add an archive or directory to the search path. \end{DoxyCompactList}\item 
const char $\ast$ \textbf{ P\+H\+Y\+S\+F\+S\+\_\+get\+Mount\+Point} (const char $\ast$dir)
\begin{DoxyCompactList}\small\item\em Determine a mounted archive\textquotesingle{}s mountpoint. \end{DoxyCompactList}\item 
void \textbf{ P\+H\+Y\+S\+F\+S\+\_\+get\+Cd\+Rom\+Dirs\+Callback} (\textbf{ P\+H\+Y\+S\+F\+S\+\_\+\+String\+Callback} c, void $\ast$d)
\begin{DoxyCompactList}\small\item\em Enumerate C\+D-\/\+R\+OM directories, using an application-\/defined callback. \end{DoxyCompactList}\item 
void \textbf{ P\+H\+Y\+S\+F\+S\+\_\+get\+Search\+Path\+Callback} (\textbf{ P\+H\+Y\+S\+F\+S\+\_\+\+String\+Callback} c, void $\ast$d)
\begin{DoxyCompactList}\small\item\em Enumerate the search path, using an application-\/defined callback. \end{DoxyCompactList}\item 
void \textbf{ P\+H\+Y\+S\+F\+S\+\_\+enumerate\+Files\+Callback} (const char $\ast$dir, \textbf{ P\+H\+Y\+S\+F\+S\+\_\+\+Enum\+Files\+Callback} c, void $\ast$d)
\begin{DoxyCompactList}\small\item\em Get a file listing of a search path\textquotesingle{}s directory, using an application-\/defined callback. \end{DoxyCompactList}\item 
void \textbf{ P\+H\+Y\+S\+F\+S\+\_\+utf8\+From\+Ucs4} (const \textbf{ P\+H\+Y\+S\+F\+S\+\_\+uint32} $\ast$src, char $\ast$dst, \textbf{ P\+H\+Y\+S\+F\+S\+\_\+uint64} len)
\begin{DoxyCompactList}\small\item\em Convert a U\+C\+S-\/4 string to a U\+T\+F-\/8 string. \end{DoxyCompactList}\item 
void \textbf{ P\+H\+Y\+S\+F\+S\+\_\+utf8\+To\+Ucs4} (const char $\ast$src, \textbf{ P\+H\+Y\+S\+F\+S\+\_\+uint32} $\ast$dst, \textbf{ P\+H\+Y\+S\+F\+S\+\_\+uint64} len)
\begin{DoxyCompactList}\small\item\em Convert a U\+T\+F-\/8 string to a U\+C\+S-\/4 string. \end{DoxyCompactList}\item 
void \textbf{ P\+H\+Y\+S\+F\+S\+\_\+utf8\+From\+Ucs2} (const \textbf{ P\+H\+Y\+S\+F\+S\+\_\+uint16} $\ast$src, char $\ast$dst, \textbf{ P\+H\+Y\+S\+F\+S\+\_\+uint64} len)
\begin{DoxyCompactList}\small\item\em Convert a U\+C\+S-\/2 string to a U\+T\+F-\/8 string. \end{DoxyCompactList}\item 
void \textbf{ P\+H\+Y\+S\+F\+S\+\_\+utf8\+To\+Ucs2} (const char $\ast$src, \textbf{ P\+H\+Y\+S\+F\+S\+\_\+uint16} $\ast$dst, \textbf{ P\+H\+Y\+S\+F\+S\+\_\+uint64} len)
\begin{DoxyCompactList}\small\item\em Convert a U\+T\+F-\/8 string to a U\+C\+S-\/2 string. \end{DoxyCompactList}\item 
void \textbf{ P\+H\+Y\+S\+F\+S\+\_\+utf8\+From\+Latin1} (const char $\ast$src, char $\ast$dst, \textbf{ P\+H\+Y\+S\+F\+S\+\_\+uint64} len)
\begin{DoxyCompactList}\small\item\em Convert a U\+T\+F-\/8 string to a Latin1 string. \end{DoxyCompactList}\item 
int \textbf{ P\+H\+Y\+S\+F\+S\+\_\+case\+Fold} (const \textbf{ P\+H\+Y\+S\+F\+S\+\_\+uint32} from, \textbf{ P\+H\+Y\+S\+F\+S\+\_\+uint32} $\ast$to)
\begin{DoxyCompactList}\small\item\em \char`\"{}\+Fold\char`\"{} a Unicode codepoint to a lowercase equivalent. \end{DoxyCompactList}\item 
int \textbf{ P\+H\+Y\+S\+F\+S\+\_\+utf8stricmp} (const char $\ast$str1, const char $\ast$str2)
\begin{DoxyCompactList}\small\item\em Case-\/insensitive compare of two U\+T\+F-\/8 strings. \end{DoxyCompactList}\item 
int \textbf{ P\+H\+Y\+S\+F\+S\+\_\+utf16stricmp} (const \textbf{ P\+H\+Y\+S\+F\+S\+\_\+uint16} $\ast$str1, const \textbf{ P\+H\+Y\+S\+F\+S\+\_\+uint16} $\ast$str2)
\begin{DoxyCompactList}\small\item\em Case-\/insensitive compare of two U\+T\+F-\/16 strings. \end{DoxyCompactList}\item 
int \textbf{ P\+H\+Y\+S\+F\+S\+\_\+ucs4stricmp} (const \textbf{ P\+H\+Y\+S\+F\+S\+\_\+uint32} $\ast$str1, const \textbf{ P\+H\+Y\+S\+F\+S\+\_\+uint32} $\ast$str2)
\begin{DoxyCompactList}\small\item\em Case-\/insensitive compare of two U\+C\+S-\/4 strings. \end{DoxyCompactList}\item 
int \textbf{ P\+H\+Y\+S\+F\+S\+\_\+enumerate} (const char $\ast$dir, \textbf{ P\+H\+Y\+S\+F\+S\+\_\+\+Enumerate\+Callback} c, void $\ast$d)
\begin{DoxyCompactList}\small\item\em Get a file listing of a search path\textquotesingle{}s directory, using an application-\/defined callback, with errors reported. \end{DoxyCompactList}\item 
int \textbf{ P\+H\+Y\+S\+F\+S\+\_\+unmount} (const char $\ast$old\+Dir)
\begin{DoxyCompactList}\small\item\em Remove a directory or archive from the search path. \end{DoxyCompactList}\item 
const \textbf{ P\+H\+Y\+S\+F\+S\+\_\+\+Allocator} $\ast$ \textbf{ P\+H\+Y\+S\+F\+S\+\_\+get\+Allocator} (void)
\begin{DoxyCompactList}\small\item\em Discover the current allocator. \end{DoxyCompactList}\item 
int \textbf{ P\+H\+Y\+S\+F\+S\+\_\+stat} (const char $\ast$fname, \textbf{ P\+H\+Y\+S\+F\+S\+\_\+\+Stat} $\ast$stat)
\begin{DoxyCompactList}\small\item\em Get various information about a directory or a file. \end{DoxyCompactList}\item 
void \textbf{ P\+H\+Y\+S\+F\+S\+\_\+utf8\+From\+Utf16} (const \textbf{ P\+H\+Y\+S\+F\+S\+\_\+uint16} $\ast$src, char $\ast$dst, \textbf{ P\+H\+Y\+S\+F\+S\+\_\+uint64} len)
\begin{DoxyCompactList}\small\item\em Convert a U\+T\+F-\/16 string to a U\+T\+F-\/8 string. \end{DoxyCompactList}\item 
void \textbf{ P\+H\+Y\+S\+F\+S\+\_\+utf8\+To\+Utf16} (const char $\ast$src, \textbf{ P\+H\+Y\+S\+F\+S\+\_\+uint16} $\ast$dst, \textbf{ P\+H\+Y\+S\+F\+S\+\_\+uint64} len)
\begin{DoxyCompactList}\small\item\em Convert a U\+T\+F-\/8 string to a U\+T\+F-\/16 string. \end{DoxyCompactList}\item 
\textbf{ P\+H\+Y\+S\+F\+S\+\_\+sint64} \textbf{ P\+H\+Y\+S\+F\+S\+\_\+read\+Bytes} (\textbf{ P\+H\+Y\+S\+F\+S\+\_\+\+File} $\ast$handle, void $\ast$buffer, \textbf{ P\+H\+Y\+S\+F\+S\+\_\+uint64} len)
\begin{DoxyCompactList}\small\item\em Read bytes from a Physics\+FS filehandle. \end{DoxyCompactList}\item 
\textbf{ P\+H\+Y\+S\+F\+S\+\_\+sint64} \textbf{ P\+H\+Y\+S\+F\+S\+\_\+write\+Bytes} (\textbf{ P\+H\+Y\+S\+F\+S\+\_\+\+File} $\ast$handle, const void $\ast$buffer, \textbf{ P\+H\+Y\+S\+F\+S\+\_\+uint64} len)
\begin{DoxyCompactList}\small\item\em Write data to a Physics\+FS filehandle. \end{DoxyCompactList}\item 
int \textbf{ P\+H\+Y\+S\+F\+S\+\_\+mount\+Io} (\textbf{ P\+H\+Y\+S\+F\+S\+\_\+\+Io} $\ast$io, const char $\ast$new\+Dir, const char $\ast$mount\+Point, int append\+To\+Path)
\begin{DoxyCompactList}\small\item\em Add an archive, built on a \doxyref{P\+H\+Y\+S\+F\+S\+\_\+\+Io}{p.}{structPHYSFS__Io}, to the search path. \end{DoxyCompactList}\item 
int \textbf{ P\+H\+Y\+S\+F\+S\+\_\+mount\+Memory} (const void $\ast$buf, \textbf{ P\+H\+Y\+S\+F\+S\+\_\+uint64} len, void($\ast$del)(void $\ast$), const char $\ast$new\+Dir, const char $\ast$mount\+Point, int append\+To\+Path)
\begin{DoxyCompactList}\small\item\em Add an archive, contained in a memory buffer, to the search path. \end{DoxyCompactList}\item 
int \textbf{ P\+H\+Y\+S\+F\+S\+\_\+mount\+Handle} (\textbf{ P\+H\+Y\+S\+F\+S\+\_\+\+File} $\ast$file, const char $\ast$new\+Dir, const char $\ast$mount\+Point, int append\+To\+Path)
\begin{DoxyCompactList}\small\item\em Add an archive, contained in a \doxyref{P\+H\+Y\+S\+F\+S\+\_\+\+File}{p.}{structPHYSFS__File} handle, to the search path. \end{DoxyCompactList}\item 
\textbf{ P\+H\+Y\+S\+F\+S\+\_\+\+Error\+Code} \textbf{ P\+H\+Y\+S\+F\+S\+\_\+get\+Last\+Error\+Code} (void)
\begin{DoxyCompactList}\small\item\em Get machine-\/readable error information. \end{DoxyCompactList}\item 
const char $\ast$ \textbf{ P\+H\+Y\+S\+F\+S\+\_\+get\+Error\+By\+Code} (\textbf{ P\+H\+Y\+S\+F\+S\+\_\+\+Error\+Code} code)
\begin{DoxyCompactList}\small\item\em Get human-\/readable description string for a given error code. \end{DoxyCompactList}\item 
void \textbf{ P\+H\+Y\+S\+F\+S\+\_\+set\+Error\+Code} (\textbf{ P\+H\+Y\+S\+F\+S\+\_\+\+Error\+Code} code)
\begin{DoxyCompactList}\small\item\em Set the current thread\textquotesingle{}s error code. \end{DoxyCompactList}\item 
const char $\ast$ \textbf{ P\+H\+Y\+S\+F\+S\+\_\+get\+Pref\+Dir} (const char $\ast$org, const char $\ast$app)
\begin{DoxyCompactList}\small\item\em Get the user-\/and-\/app-\/specific path where files can be written. \end{DoxyCompactList}\item 
int \textbf{ P\+H\+Y\+S\+F\+S\+\_\+register\+Archiver} (const \textbf{ P\+H\+Y\+S\+F\+S\+\_\+\+Archiver} $\ast$archiver)
\begin{DoxyCompactList}\small\item\em Add a new archiver to the system. \end{DoxyCompactList}\item 
int \textbf{ P\+H\+Y\+S\+F\+S\+\_\+deregister\+Archiver} (const char $\ast$ext)
\begin{DoxyCompactList}\small\item\em Remove an archiver from the system. \end{DoxyCompactList}\end{DoxyCompactItemize}


\subsection{Detailed Description}
Main header file for Physics\+FS. 

\subsection{Macro Definition Documentation}
\mbox{\label{physfs_8h_ad32c738a1a111f0d3f29e4637633bfd1}} 
\index{physfs.\+h@{physfs.\+h}!P\+H\+Y\+S\+F\+S\+\_\+file@{P\+H\+Y\+S\+F\+S\+\_\+file}}
\index{P\+H\+Y\+S\+F\+S\+\_\+file@{P\+H\+Y\+S\+F\+S\+\_\+file}!physfs.\+h@{physfs.\+h}}
\subsubsection{P\+H\+Y\+S\+F\+S\+\_\+file}
{\footnotesize\ttfamily \#define P\+H\+Y\+S\+F\+S\+\_\+file~\textbf{ P\+H\+Y\+S\+F\+S\+\_\+\+File}}



1.\+0 A\+PI compatibility define. 

P\+H\+Y\+S\+F\+S\+\_\+file is identical to \doxyref{P\+H\+Y\+S\+F\+S\+\_\+\+File}{p.}{structPHYSFS__File}. This \#define is here for backwards compatibility with the 1.\+0 A\+PI, which had an inconsistent capitalization convention in this case. New code should use \doxyref{P\+H\+Y\+S\+F\+S\+\_\+\+File}{p.}{structPHYSFS__File}, as this \#define may go away someday.

\begin{DoxySeeAlso}{See also}
\doxyref{P\+H\+Y\+S\+F\+S\+\_\+\+File}{p.}{structPHYSFS__File} 
\end{DoxySeeAlso}
\mbox{\label{physfs_8h_acb77c1f8f70028add43b9f81eef1ed78}} 
\index{physfs.\+h@{physfs.\+h}!P\+H\+Y\+S\+F\+S\+\_\+\+V\+E\+R\+S\+I\+ON@{P\+H\+Y\+S\+F\+S\+\_\+\+V\+E\+R\+S\+I\+ON}}
\index{P\+H\+Y\+S\+F\+S\+\_\+\+V\+E\+R\+S\+I\+ON@{P\+H\+Y\+S\+F\+S\+\_\+\+V\+E\+R\+S\+I\+ON}!physfs.\+h@{physfs.\+h}}
\subsubsection{P\+H\+Y\+S\+F\+S\+\_\+\+V\+E\+R\+S\+I\+ON}
{\footnotesize\ttfamily \#define P\+H\+Y\+S\+F\+S\+\_\+\+V\+E\+R\+S\+I\+ON(\begin{DoxyParamCaption}\item[{}]{x }\end{DoxyParamCaption})}

{\bfseries Value\+:}
\begin{DoxyCode}
\{ \(\backslash\)
    (x)->major = PHYSFS\_VER\_MAJOR; \(\backslash\)
    (x)->minor = PHYSFS\_VER\_MINOR; \(\backslash\)
    (x)->patch = PHYSFS\_VER\_PATCH; \(\backslash\)
\}
\end{DoxyCode}


Macro to determine Physics\+FS version program was compiled against. 

This macro fills in a \doxyref{P\+H\+Y\+S\+F\+S\+\_\+\+Version}{p.}{structPHYSFS__Version} structure with the version of the library you compiled against. This is determined by what header the compiler uses. Note that if you dynamically linked the library, you might have a slightly newer or older version at runtime. That version can be determined with \doxyref{P\+H\+Y\+S\+F\+S\+\_\+get\+Linked\+Version()}{p.}{physfs_8h_a8977d0ba0a2301256e823532479f1a05}, which, unlike P\+H\+Y\+S\+F\+S\+\_\+\+V\+E\+R\+S\+I\+ON, is not a macro.


\begin{DoxyParams}{Parameters}
{\em x} & A pointer to a \doxyref{P\+H\+Y\+S\+F\+S\+\_\+\+Version}{p.}{structPHYSFS__Version} struct to initialize.\\
\hline
\end{DoxyParams}
\begin{DoxySeeAlso}{See also}
\doxyref{P\+H\+Y\+S\+F\+S\+\_\+\+Version}{p.}{structPHYSFS__Version} 

\doxyref{P\+H\+Y\+S\+F\+S\+\_\+get\+Linked\+Version}{p.}{physfs_8h_a8977d0ba0a2301256e823532479f1a05} 
\end{DoxySeeAlso}


\subsection{Typedef Documentation}
\mbox{\label{physfs_8h_a1e72dbc92c0decdca218c8a9a658e788}} 
\index{physfs.\+h@{physfs.\+h}!P\+H\+Y\+S\+F\+S\+\_\+\+Enumerate\+Callback@{P\+H\+Y\+S\+F\+S\+\_\+\+Enumerate\+Callback}}
\index{P\+H\+Y\+S\+F\+S\+\_\+\+Enumerate\+Callback@{P\+H\+Y\+S\+F\+S\+\_\+\+Enumerate\+Callback}!physfs.\+h@{physfs.\+h}}
\subsubsection{P\+H\+Y\+S\+F\+S\+\_\+\+Enumerate\+Callback}
{\footnotesize\ttfamily P\+H\+Y\+S\+F\+S\+\_\+\+Enumerate\+Callback}



Possible return values from P\+H\+Y\+S\+F\+S\+\_\+\+Enumerate\+Callback. 

Function signature for callbacks that enumerate and return results.

These values dictate if an enumeration callback should continue to fire, or stop (and why it is stopping).

\begin{DoxySeeAlso}{See also}
\doxyref{P\+H\+Y\+S\+F\+S\+\_\+\+Enumerate\+Callback}{p.}{physfs_8h_a1e72dbc92c0decdca218c8a9a658e788} 

\doxyref{P\+H\+Y\+S\+F\+S\+\_\+enumerate}{p.}{physfs_8h_a33085cbbf18ba7eb659cf2a43d6793ba}
\end{DoxySeeAlso}
This is the same thing as P\+H\+Y\+S\+F\+S\+\_\+\+Enum\+Files\+Callback from Physics\+FS 2.\+0, except it can return a result from the callback\+: namely\+: if you\textquotesingle{}re looking for something specific, once you find it, you can tell Physics\+FS to stop enumerating further. This is used with \doxyref{P\+H\+Y\+S\+F\+S\+\_\+enumerate()}{p.}{physfs_8h_a33085cbbf18ba7eb659cf2a43d6793ba}, which we hopefully got right this time. \+:)


\begin{DoxyParams}{Parameters}
{\em data} & User-\/defined data pointer, passed through from the A\+PI that eventually called the callback. \\
\hline
{\em origdir} & A string containing the full path, in platform-\/independent notation, of the directory containing this file. In most cases, this is the directory on which you requested enumeration, passed in the callback for your convenience. \\
\hline
{\em fname} & The filename that is being enumerated. It may not be in alphabetical order compared to other callbacks that have fired, and it will not contain the full path. You can recreate the fullpath with \$origdir/\$fname ... The file can be a subdirectory, a file, a symlink, etc. \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
A value from P\+H\+Y\+S\+F\+S\+\_\+\+Enumerate\+Callback\+Result. All other values are (currently) undefined; don\textquotesingle{}t use them.
\end{DoxyReturn}
\begin{DoxySeeAlso}{See also}
\doxyref{P\+H\+Y\+S\+F\+S\+\_\+enumerate}{p.}{physfs_8h_a33085cbbf18ba7eb659cf2a43d6793ba} 

\doxyref{P\+H\+Y\+S\+F\+S\+\_\+\+Enumerate\+Callback\+Result}{p.}{physfs_8h_aa11a2522c5f699b00d19802b721e73d4} 
\end{DoxySeeAlso}
\mbox{\label{physfs_8h_a51c1e0145502aeaf080973d308d33c6a}} 
\index{physfs.\+h@{physfs.\+h}!P\+H\+Y\+S\+F\+S\+\_\+\+Enum\+Files\+Callback@{P\+H\+Y\+S\+F\+S\+\_\+\+Enum\+Files\+Callback}}
\index{P\+H\+Y\+S\+F\+S\+\_\+\+Enum\+Files\+Callback@{P\+H\+Y\+S\+F\+S\+\_\+\+Enum\+Files\+Callback}!physfs.\+h@{physfs.\+h}}
\subsubsection{P\+H\+Y\+S\+F\+S\+\_\+\+Enum\+Files\+Callback}
{\footnotesize\ttfamily P\+H\+Y\+S\+F\+S\+\_\+\+Enum\+Files\+Callback}



Function signature for callbacks that enumerate files. 

\begin{DoxyWarning}{Warning}
As of Physics\+FS 2.\+1, Use P\+H\+Y\+S\+F\+S\+\_\+\+Enumerate\+Callback with \doxyref{P\+H\+Y\+S\+F\+S\+\_\+enumerate()}{p.}{physfs_8h_a33085cbbf18ba7eb659cf2a43d6793ba} instead; it gives you more control over the process.
\end{DoxyWarning}
These are used to report a list of directory entries to an original caller, one file/dir/symlink per callback. All strings are U\+T\+F-\/8 encoded. Functions should not try to modify or free any string\textquotesingle{}s memory.

These callbacks are used, starting in Physics\+FS 1.\+1, as an alternative to functions that would return lists that need to be cleaned up with \doxyref{P\+H\+Y\+S\+F\+S\+\_\+free\+List()}{p.}{physfs_8h_af6aeb2ffdcee44f02cf380da62462b05}. The callback means that the library doesn\textquotesingle{}t need to allocate an entire list and all the strings up front.

Be aware that promised data ordering in the list versions are not necessarily so in the callback versions. Check the documentation on specific A\+P\+Is, but strings may not be sorted as you expect and you might get duplicate strings.


\begin{DoxyParams}{Parameters}
{\em data} & User-\/defined data pointer, passed through from the A\+PI that eventually called the callback. \\
\hline
{\em origdir} & A string containing the full path, in platform-\/independent notation, of the directory containing this file. In most cases, this is the directory on which you requested enumeration, passed in the callback for your convenience. \\
\hline
{\em fname} & The filename that is being enumerated. It may not be in alphabetical order compared to other callbacks that have fired, and it will not contain the full path. You can recreate the fullpath with \$origdir/\$fname ... The file can be a subdirectory, a file, a symlink, etc.\\
\hline
\end{DoxyParams}
\begin{DoxySeeAlso}{See also}
\doxyref{P\+H\+Y\+S\+F\+S\+\_\+enumerate\+Files\+Callback}{p.}{physfs_8h_a9d3541369a4eb0a95f946bc3f4103dfb} 
\end{DoxySeeAlso}
\mbox{\label{physfs_8h_a88c5f1d7b088888c729b22644651c9f5}} 
\index{physfs.\+h@{physfs.\+h}!P\+H\+Y\+S\+F\+S\+\_\+sint64@{P\+H\+Y\+S\+F\+S\+\_\+sint64}}
\index{P\+H\+Y\+S\+F\+S\+\_\+sint64@{P\+H\+Y\+S\+F\+S\+\_\+sint64}!physfs.\+h@{physfs.\+h}}
\subsubsection{P\+H\+Y\+S\+F\+S\+\_\+sint64}
{\footnotesize\ttfamily \textbf{ P\+H\+Y\+S\+F\+S\+\_\+sint64}}



A signed, 64-\/bit integer type. 

\begin{DoxyWarning}{Warning}
on platforms without any sort of 64-\/bit datatype, this is equivalent to P\+H\+Y\+S\+F\+S\+\_\+sint32! 
\end{DoxyWarning}
\mbox{\label{physfs_8h_a6331ac65f8e0d32288f8597e48188a4f}} 
\index{physfs.\+h@{physfs.\+h}!P\+H\+Y\+S\+F\+S\+\_\+\+String\+Callback@{P\+H\+Y\+S\+F\+S\+\_\+\+String\+Callback}}
\index{P\+H\+Y\+S\+F\+S\+\_\+\+String\+Callback@{P\+H\+Y\+S\+F\+S\+\_\+\+String\+Callback}!physfs.\+h@{physfs.\+h}}
\subsubsection{P\+H\+Y\+S\+F\+S\+\_\+\+String\+Callback}
{\footnotesize\ttfamily P\+H\+Y\+S\+F\+S\+\_\+\+String\+Callback}



Function signature for callbacks that report strings. 

These are used to report a list of strings to an original caller, one string per callback. All strings are U\+T\+F-\/8 encoded. Functions should not try to modify or free the string\textquotesingle{}s memory.

These callbacks are used, starting in Physics\+FS 1.\+1, as an alternative to functions that would return lists that need to be cleaned up with \doxyref{P\+H\+Y\+S\+F\+S\+\_\+free\+List()}{p.}{physfs_8h_af6aeb2ffdcee44f02cf380da62462b05}. The callback means that the library doesn\textquotesingle{}t need to allocate an entire list and all the strings up front.

Be aware that promises data ordering in the list versions are not necessarily so in the callback versions. Check the documentation on specific A\+P\+Is, but strings may not be sorted as you expect.


\begin{DoxyParams}{Parameters}
{\em data} & User-\/defined data pointer, passed through from the A\+PI that eventually called the callback. \\
\hline
{\em str} & The string data about which the callback is meant to inform.\\
\hline
\end{DoxyParams}
\begin{DoxySeeAlso}{See also}
\doxyref{P\+H\+Y\+S\+F\+S\+\_\+get\+Cd\+Rom\+Dirs\+Callback}{p.}{physfs_8h_ace04dfd0654ce55a81a85f57f56c7410} 

\doxyref{P\+H\+Y\+S\+F\+S\+\_\+get\+Search\+Path\+Callback}{p.}{physfs_8h_abd5f7188ab27722b0651e7503c6a737a} 
\end{DoxySeeAlso}
\mbox{\label{physfs_8h_a632ba02500231e5f6f6df2e4cb71c818}} 
\index{physfs.\+h@{physfs.\+h}!P\+H\+Y\+S\+F\+S\+\_\+uint64@{P\+H\+Y\+S\+F\+S\+\_\+uint64}}
\index{P\+H\+Y\+S\+F\+S\+\_\+uint64@{P\+H\+Y\+S\+F\+S\+\_\+uint64}!physfs.\+h@{physfs.\+h}}
\subsubsection{P\+H\+Y\+S\+F\+S\+\_\+uint64}
{\footnotesize\ttfamily \textbf{ P\+H\+Y\+S\+F\+S\+\_\+uint64}}



An unsigned, 64-\/bit integer type. 

\begin{DoxyWarning}{Warning}
on platforms without any sort of 64-\/bit datatype, this is equivalent to P\+H\+Y\+S\+F\+S\+\_\+uint32! 
\end{DoxyWarning}


\subsection{Enumeration Type Documentation}
\mbox{\label{physfs_8h_aa11a2522c5f699b00d19802b721e73d4}} 
\index{physfs.\+h@{physfs.\+h}!P\+H\+Y\+S\+F\+S\+\_\+\+Enumerate\+Callback\+Result@{P\+H\+Y\+S\+F\+S\+\_\+\+Enumerate\+Callback\+Result}}
\index{P\+H\+Y\+S\+F\+S\+\_\+\+Enumerate\+Callback\+Result@{P\+H\+Y\+S\+F\+S\+\_\+\+Enumerate\+Callback\+Result}!physfs.\+h@{physfs.\+h}}
\subsubsection{P\+H\+Y\+S\+F\+S\+\_\+\+Enumerate\+Callback\+Result}
{\footnotesize\ttfamily enum \textbf{ P\+H\+Y\+S\+F\+S\+\_\+\+Enumerate\+Callback\+Result}}

\begin{DoxyEnumFields}{Enumerator}
\raisebox{\heightof{T}}[0pt][0pt]{\index{P\+H\+Y\+S\+F\+S\+\_\+\+E\+N\+U\+M\+\_\+\+E\+R\+R\+OR@{P\+H\+Y\+S\+F\+S\+\_\+\+E\+N\+U\+M\+\_\+\+E\+R\+R\+OR}!physfs.\+h@{physfs.\+h}}\index{physfs.\+h@{physfs.\+h}!P\+H\+Y\+S\+F\+S\+\_\+\+E\+N\+U\+M\+\_\+\+E\+R\+R\+OR@{P\+H\+Y\+S\+F\+S\+\_\+\+E\+N\+U\+M\+\_\+\+E\+R\+R\+OR}}}\mbox{\label{physfs_8h_aa11a2522c5f699b00d19802b721e73d4a709ef5541f2471dc606a204bded733e1}} 
P\+H\+Y\+S\+F\+S\+\_\+\+E\+N\+U\+M\+\_\+\+E\+R\+R\+OR&Stop enumerating, report error to app. \\
\hline

\raisebox{\heightof{T}}[0pt][0pt]{\index{P\+H\+Y\+S\+F\+S\+\_\+\+E\+N\+U\+M\+\_\+\+S\+T\+OP@{P\+H\+Y\+S\+F\+S\+\_\+\+E\+N\+U\+M\+\_\+\+S\+T\+OP}!physfs.\+h@{physfs.\+h}}\index{physfs.\+h@{physfs.\+h}!P\+H\+Y\+S\+F\+S\+\_\+\+E\+N\+U\+M\+\_\+\+S\+T\+OP@{P\+H\+Y\+S\+F\+S\+\_\+\+E\+N\+U\+M\+\_\+\+S\+T\+OP}}}\mbox{\label{physfs_8h_aa11a2522c5f699b00d19802b721e73d4a793f45e661a94768c0826b6ea1e93aa3}} 
P\+H\+Y\+S\+F\+S\+\_\+\+E\+N\+U\+M\+\_\+\+S\+T\+OP&Stop enumerating, report success to app. \\
\hline

\raisebox{\heightof{T}}[0pt][0pt]{\index{P\+H\+Y\+S\+F\+S\+\_\+\+E\+N\+U\+M\+\_\+\+OK@{P\+H\+Y\+S\+F\+S\+\_\+\+E\+N\+U\+M\+\_\+\+OK}!physfs.\+h@{physfs.\+h}}\index{physfs.\+h@{physfs.\+h}!P\+H\+Y\+S\+F\+S\+\_\+\+E\+N\+U\+M\+\_\+\+OK@{P\+H\+Y\+S\+F\+S\+\_\+\+E\+N\+U\+M\+\_\+\+OK}}}\mbox{\label{physfs_8h_aa11a2522c5f699b00d19802b721e73d4ac8d05f52332e6b6452dc52e58f0bfdfe}} 
P\+H\+Y\+S\+F\+S\+\_\+\+E\+N\+U\+M\+\_\+\+OK&Keep enumerating, no problems \\
\hline

\end{DoxyEnumFields}
\mbox{\label{physfs_8h_a50dba13af51214897c867a123f74afed}} 
\index{physfs.\+h@{physfs.\+h}!P\+H\+Y\+S\+F\+S\+\_\+\+Error\+Code@{P\+H\+Y\+S\+F\+S\+\_\+\+Error\+Code}}
\index{P\+H\+Y\+S\+F\+S\+\_\+\+Error\+Code@{P\+H\+Y\+S\+F\+S\+\_\+\+Error\+Code}!physfs.\+h@{physfs.\+h}}
\subsubsection{P\+H\+Y\+S\+F\+S\+\_\+\+Error\+Code}
{\footnotesize\ttfamily enum \textbf{ P\+H\+Y\+S\+F\+S\+\_\+\+Error\+Code}}



Values that represent specific causes of failure. 

Most of the time, you should only concern yourself with whether a given operation failed or not, but there may be occasions where you plan to handle a specific failure case gracefully, so we provide specific error codes.

Most of these errors are a little vague, and most aren\textquotesingle{}t things you can fix...if there\textquotesingle{}s a permission error, for example, all you can really do is pass that information on to the user and let them figure out how to handle it. In most these cases, your program should only care that it failed to accomplish its goals, and not care specifically why.

\begin{DoxySeeAlso}{See also}
\doxyref{P\+H\+Y\+S\+F\+S\+\_\+get\+Last\+Error\+Code}{p.}{physfs_8h_ae916a873aae2cf6b6e09d733cd1b3f4b} 

\doxyref{P\+H\+Y\+S\+F\+S\+\_\+get\+Error\+By\+Code}{p.}{physfs_8h_a545f6b5ba97faa19441932dffb65c3be} 
\end{DoxySeeAlso}
\begin{DoxyEnumFields}{Enumerator}
\raisebox{\heightof{T}}[0pt][0pt]{\index{P\+H\+Y\+S\+F\+S\+\_\+\+E\+R\+R\+\_\+\+OK@{P\+H\+Y\+S\+F\+S\+\_\+\+E\+R\+R\+\_\+\+OK}!physfs.\+h@{physfs.\+h}}\index{physfs.\+h@{physfs.\+h}!P\+H\+Y\+S\+F\+S\+\_\+\+E\+R\+R\+\_\+\+OK@{P\+H\+Y\+S\+F\+S\+\_\+\+E\+R\+R\+\_\+\+OK}}}\mbox{\label{physfs_8h_a50dba13af51214897c867a123f74afeda350a0311fc19d8b9b5ec06f312e703ce}} 
P\+H\+Y\+S\+F\+S\+\_\+\+E\+R\+R\+\_\+\+OK&Success; no error. \\
\hline

\raisebox{\heightof{T}}[0pt][0pt]{\index{P\+H\+Y\+S\+F\+S\+\_\+\+E\+R\+R\+\_\+\+O\+T\+H\+E\+R\+\_\+\+E\+R\+R\+OR@{P\+H\+Y\+S\+F\+S\+\_\+\+E\+R\+R\+\_\+\+O\+T\+H\+E\+R\+\_\+\+E\+R\+R\+OR}!physfs.\+h@{physfs.\+h}}\index{physfs.\+h@{physfs.\+h}!P\+H\+Y\+S\+F\+S\+\_\+\+E\+R\+R\+\_\+\+O\+T\+H\+E\+R\+\_\+\+E\+R\+R\+OR@{P\+H\+Y\+S\+F\+S\+\_\+\+E\+R\+R\+\_\+\+O\+T\+H\+E\+R\+\_\+\+E\+R\+R\+OR}}}\mbox{\label{physfs_8h_a50dba13af51214897c867a123f74afedaf6bd49755fa19f8c94f326d1dd45bc60}} 
P\+H\+Y\+S\+F\+S\+\_\+\+E\+R\+R\+\_\+\+O\+T\+H\+E\+R\+\_\+\+E\+R\+R\+OR&Error not otherwise covered here. \\
\hline

\raisebox{\heightof{T}}[0pt][0pt]{\index{P\+H\+Y\+S\+F\+S\+\_\+\+E\+R\+R\+\_\+\+O\+U\+T\+\_\+\+O\+F\+\_\+\+M\+E\+M\+O\+RY@{P\+H\+Y\+S\+F\+S\+\_\+\+E\+R\+R\+\_\+\+O\+U\+T\+\_\+\+O\+F\+\_\+\+M\+E\+M\+O\+RY}!physfs.\+h@{physfs.\+h}}\index{physfs.\+h@{physfs.\+h}!P\+H\+Y\+S\+F\+S\+\_\+\+E\+R\+R\+\_\+\+O\+U\+T\+\_\+\+O\+F\+\_\+\+M\+E\+M\+O\+RY@{P\+H\+Y\+S\+F\+S\+\_\+\+E\+R\+R\+\_\+\+O\+U\+T\+\_\+\+O\+F\+\_\+\+M\+E\+M\+O\+RY}}}\mbox{\label{physfs_8h_a50dba13af51214897c867a123f74afeda3cad5fa8b3b9fdd5d898ec0c49468842}} 
P\+H\+Y\+S\+F\+S\+\_\+\+E\+R\+R\+\_\+\+O\+U\+T\+\_\+\+O\+F\+\_\+\+M\+E\+M\+O\+RY&Memory allocation failed. \\
\hline

\raisebox{\heightof{T}}[0pt][0pt]{\index{P\+H\+Y\+S\+F\+S\+\_\+\+E\+R\+R\+\_\+\+N\+O\+T\+\_\+\+I\+N\+I\+T\+I\+A\+L\+I\+Z\+ED@{P\+H\+Y\+S\+F\+S\+\_\+\+E\+R\+R\+\_\+\+N\+O\+T\+\_\+\+I\+N\+I\+T\+I\+A\+L\+I\+Z\+ED}!physfs.\+h@{physfs.\+h}}\index{physfs.\+h@{physfs.\+h}!P\+H\+Y\+S\+F\+S\+\_\+\+E\+R\+R\+\_\+\+N\+O\+T\+\_\+\+I\+N\+I\+T\+I\+A\+L\+I\+Z\+ED@{P\+H\+Y\+S\+F\+S\+\_\+\+E\+R\+R\+\_\+\+N\+O\+T\+\_\+\+I\+N\+I\+T\+I\+A\+L\+I\+Z\+ED}}}\mbox{\label{physfs_8h_a50dba13af51214897c867a123f74afedaf162fd97734c33e5daea378f8ad8f700}} 
P\+H\+Y\+S\+F\+S\+\_\+\+E\+R\+R\+\_\+\+N\+O\+T\+\_\+\+I\+N\+I\+T\+I\+A\+L\+I\+Z\+ED&Physics\+FS is not initialized. \\
\hline

\raisebox{\heightof{T}}[0pt][0pt]{\index{P\+H\+Y\+S\+F\+S\+\_\+\+E\+R\+R\+\_\+\+I\+S\+\_\+\+I\+N\+I\+T\+I\+A\+L\+I\+Z\+ED@{P\+H\+Y\+S\+F\+S\+\_\+\+E\+R\+R\+\_\+\+I\+S\+\_\+\+I\+N\+I\+T\+I\+A\+L\+I\+Z\+ED}!physfs.\+h@{physfs.\+h}}\index{physfs.\+h@{physfs.\+h}!P\+H\+Y\+S\+F\+S\+\_\+\+E\+R\+R\+\_\+\+I\+S\+\_\+\+I\+N\+I\+T\+I\+A\+L\+I\+Z\+ED@{P\+H\+Y\+S\+F\+S\+\_\+\+E\+R\+R\+\_\+\+I\+S\+\_\+\+I\+N\+I\+T\+I\+A\+L\+I\+Z\+ED}}}\mbox{\label{physfs_8h_a50dba13af51214897c867a123f74afedae05bb5fb7bf20246c93010f32f1506dd}} 
P\+H\+Y\+S\+F\+S\+\_\+\+E\+R\+R\+\_\+\+I\+S\+\_\+\+I\+N\+I\+T\+I\+A\+L\+I\+Z\+ED&Physics\+FS is already initialized. \\
\hline

\raisebox{\heightof{T}}[0pt][0pt]{\index{P\+H\+Y\+S\+F\+S\+\_\+\+E\+R\+R\+\_\+\+A\+R\+G\+V0\+\_\+\+I\+S\+\_\+\+N\+U\+LL@{P\+H\+Y\+S\+F\+S\+\_\+\+E\+R\+R\+\_\+\+A\+R\+G\+V0\+\_\+\+I\+S\+\_\+\+N\+U\+LL}!physfs.\+h@{physfs.\+h}}\index{physfs.\+h@{physfs.\+h}!P\+H\+Y\+S\+F\+S\+\_\+\+E\+R\+R\+\_\+\+A\+R\+G\+V0\+\_\+\+I\+S\+\_\+\+N\+U\+LL@{P\+H\+Y\+S\+F\+S\+\_\+\+E\+R\+R\+\_\+\+A\+R\+G\+V0\+\_\+\+I\+S\+\_\+\+N\+U\+LL}}}\mbox{\label{physfs_8h_a50dba13af51214897c867a123f74afedad241a62d7f79e0604bdd7ae580381cf6}} 
P\+H\+Y\+S\+F\+S\+\_\+\+E\+R\+R\+\_\+\+A\+R\+G\+V0\+\_\+\+I\+S\+\_\+\+N\+U\+LL&Needed argv[0], but it is N\+U\+LL. \\
\hline

\raisebox{\heightof{T}}[0pt][0pt]{\index{P\+H\+Y\+S\+F\+S\+\_\+\+E\+R\+R\+\_\+\+U\+N\+S\+U\+P\+P\+O\+R\+T\+ED@{P\+H\+Y\+S\+F\+S\+\_\+\+E\+R\+R\+\_\+\+U\+N\+S\+U\+P\+P\+O\+R\+T\+ED}!physfs.\+h@{physfs.\+h}}\index{physfs.\+h@{physfs.\+h}!P\+H\+Y\+S\+F\+S\+\_\+\+E\+R\+R\+\_\+\+U\+N\+S\+U\+P\+P\+O\+R\+T\+ED@{P\+H\+Y\+S\+F\+S\+\_\+\+E\+R\+R\+\_\+\+U\+N\+S\+U\+P\+P\+O\+R\+T\+ED}}}\mbox{\label{physfs_8h_a50dba13af51214897c867a123f74afeda734e86036e56e76ece258cfd07fc607c}} 
P\+H\+Y\+S\+F\+S\+\_\+\+E\+R\+R\+\_\+\+U\+N\+S\+U\+P\+P\+O\+R\+T\+ED&Operation or feature unsupported. \\
\hline

\raisebox{\heightof{T}}[0pt][0pt]{\index{P\+H\+Y\+S\+F\+S\+\_\+\+E\+R\+R\+\_\+\+P\+A\+S\+T\+\_\+\+E\+OF@{P\+H\+Y\+S\+F\+S\+\_\+\+E\+R\+R\+\_\+\+P\+A\+S\+T\+\_\+\+E\+OF}!physfs.\+h@{physfs.\+h}}\index{physfs.\+h@{physfs.\+h}!P\+H\+Y\+S\+F\+S\+\_\+\+E\+R\+R\+\_\+\+P\+A\+S\+T\+\_\+\+E\+OF@{P\+H\+Y\+S\+F\+S\+\_\+\+E\+R\+R\+\_\+\+P\+A\+S\+T\+\_\+\+E\+OF}}}\mbox{\label{physfs_8h_a50dba13af51214897c867a123f74afeda6cfa14f636960665f071b615086ccb57}} 
P\+H\+Y\+S\+F\+S\+\_\+\+E\+R\+R\+\_\+\+P\+A\+S\+T\+\_\+\+E\+OF&Attempted to access past end of file. \\
\hline

\raisebox{\heightof{T}}[0pt][0pt]{\index{P\+H\+Y\+S\+F\+S\+\_\+\+E\+R\+R\+\_\+\+F\+I\+L\+E\+S\+\_\+\+S\+T\+I\+L\+L\+\_\+\+O\+P\+EN@{P\+H\+Y\+S\+F\+S\+\_\+\+E\+R\+R\+\_\+\+F\+I\+L\+E\+S\+\_\+\+S\+T\+I\+L\+L\+\_\+\+O\+P\+EN}!physfs.\+h@{physfs.\+h}}\index{physfs.\+h@{physfs.\+h}!P\+H\+Y\+S\+F\+S\+\_\+\+E\+R\+R\+\_\+\+F\+I\+L\+E\+S\+\_\+\+S\+T\+I\+L\+L\+\_\+\+O\+P\+EN@{P\+H\+Y\+S\+F\+S\+\_\+\+E\+R\+R\+\_\+\+F\+I\+L\+E\+S\+\_\+\+S\+T\+I\+L\+L\+\_\+\+O\+P\+EN}}}\mbox{\label{physfs_8h_a50dba13af51214897c867a123f74afeda339879ed2ed7aa5710b0db495a60df86}} 
P\+H\+Y\+S\+F\+S\+\_\+\+E\+R\+R\+\_\+\+F\+I\+L\+E\+S\+\_\+\+S\+T\+I\+L\+L\+\_\+\+O\+P\+EN&Files still open. \\
\hline

\raisebox{\heightof{T}}[0pt][0pt]{\index{P\+H\+Y\+S\+F\+S\+\_\+\+E\+R\+R\+\_\+\+I\+N\+V\+A\+L\+I\+D\+\_\+\+A\+R\+G\+U\+M\+E\+NT@{P\+H\+Y\+S\+F\+S\+\_\+\+E\+R\+R\+\_\+\+I\+N\+V\+A\+L\+I\+D\+\_\+\+A\+R\+G\+U\+M\+E\+NT}!physfs.\+h@{physfs.\+h}}\index{physfs.\+h@{physfs.\+h}!P\+H\+Y\+S\+F\+S\+\_\+\+E\+R\+R\+\_\+\+I\+N\+V\+A\+L\+I\+D\+\_\+\+A\+R\+G\+U\+M\+E\+NT@{P\+H\+Y\+S\+F\+S\+\_\+\+E\+R\+R\+\_\+\+I\+N\+V\+A\+L\+I\+D\+\_\+\+A\+R\+G\+U\+M\+E\+NT}}}\mbox{\label{physfs_8h_a50dba13af51214897c867a123f74afedaafe411479f6f10a74bd04a601cdea8e1}} 
P\+H\+Y\+S\+F\+S\+\_\+\+E\+R\+R\+\_\+\+I\+N\+V\+A\+L\+I\+D\+\_\+\+A\+R\+G\+U\+M\+E\+NT&Bad parameter passed to an function. \\
\hline

\raisebox{\heightof{T}}[0pt][0pt]{\index{P\+H\+Y\+S\+F\+S\+\_\+\+E\+R\+R\+\_\+\+N\+O\+T\+\_\+\+M\+O\+U\+N\+T\+ED@{P\+H\+Y\+S\+F\+S\+\_\+\+E\+R\+R\+\_\+\+N\+O\+T\+\_\+\+M\+O\+U\+N\+T\+ED}!physfs.\+h@{physfs.\+h}}\index{physfs.\+h@{physfs.\+h}!P\+H\+Y\+S\+F\+S\+\_\+\+E\+R\+R\+\_\+\+N\+O\+T\+\_\+\+M\+O\+U\+N\+T\+ED@{P\+H\+Y\+S\+F\+S\+\_\+\+E\+R\+R\+\_\+\+N\+O\+T\+\_\+\+M\+O\+U\+N\+T\+ED}}}\mbox{\label{physfs_8h_a50dba13af51214897c867a123f74afeda1c124b069747e079a1714de93656385b}} 
P\+H\+Y\+S\+F\+S\+\_\+\+E\+R\+R\+\_\+\+N\+O\+T\+\_\+\+M\+O\+U\+N\+T\+ED&Requested archive/dir not mounted. \\
\hline

\raisebox{\heightof{T}}[0pt][0pt]{\index{P\+H\+Y\+S\+F\+S\+\_\+\+E\+R\+R\+\_\+\+N\+O\+T\+\_\+\+F\+O\+U\+ND@{P\+H\+Y\+S\+F\+S\+\_\+\+E\+R\+R\+\_\+\+N\+O\+T\+\_\+\+F\+O\+U\+ND}!physfs.\+h@{physfs.\+h}}\index{physfs.\+h@{physfs.\+h}!P\+H\+Y\+S\+F\+S\+\_\+\+E\+R\+R\+\_\+\+N\+O\+T\+\_\+\+F\+O\+U\+ND@{P\+H\+Y\+S\+F\+S\+\_\+\+E\+R\+R\+\_\+\+N\+O\+T\+\_\+\+F\+O\+U\+ND}}}\mbox{\label{physfs_8h_a50dba13af51214897c867a123f74afeda426ece1b73ffc73afed87ed2203b84f4}} 
P\+H\+Y\+S\+F\+S\+\_\+\+E\+R\+R\+\_\+\+N\+O\+T\+\_\+\+F\+O\+U\+ND&File (or whatever) not found. \\
\hline

\raisebox{\heightof{T}}[0pt][0pt]{\index{P\+H\+Y\+S\+F\+S\+\_\+\+E\+R\+R\+\_\+\+S\+Y\+M\+L\+I\+N\+K\+\_\+\+F\+O\+R\+B\+I\+D\+D\+EN@{P\+H\+Y\+S\+F\+S\+\_\+\+E\+R\+R\+\_\+\+S\+Y\+M\+L\+I\+N\+K\+\_\+\+F\+O\+R\+B\+I\+D\+D\+EN}!physfs.\+h@{physfs.\+h}}\index{physfs.\+h@{physfs.\+h}!P\+H\+Y\+S\+F\+S\+\_\+\+E\+R\+R\+\_\+\+S\+Y\+M\+L\+I\+N\+K\+\_\+\+F\+O\+R\+B\+I\+D\+D\+EN@{P\+H\+Y\+S\+F\+S\+\_\+\+E\+R\+R\+\_\+\+S\+Y\+M\+L\+I\+N\+K\+\_\+\+F\+O\+R\+B\+I\+D\+D\+EN}}}\mbox{\label{physfs_8h_a50dba13af51214897c867a123f74afeda52883f3495052d538b935d1d67b820c3}} 
P\+H\+Y\+S\+F\+S\+\_\+\+E\+R\+R\+\_\+\+S\+Y\+M\+L\+I\+N\+K\+\_\+\+F\+O\+R\+B\+I\+D\+D\+EN&Symlink seen when not permitted. \\
\hline

\raisebox{\heightof{T}}[0pt][0pt]{\index{P\+H\+Y\+S\+F\+S\+\_\+\+E\+R\+R\+\_\+\+N\+O\+\_\+\+W\+R\+I\+T\+E\+\_\+\+D\+IR@{P\+H\+Y\+S\+F\+S\+\_\+\+E\+R\+R\+\_\+\+N\+O\+\_\+\+W\+R\+I\+T\+E\+\_\+\+D\+IR}!physfs.\+h@{physfs.\+h}}\index{physfs.\+h@{physfs.\+h}!P\+H\+Y\+S\+F\+S\+\_\+\+E\+R\+R\+\_\+\+N\+O\+\_\+\+W\+R\+I\+T\+E\+\_\+\+D\+IR@{P\+H\+Y\+S\+F\+S\+\_\+\+E\+R\+R\+\_\+\+N\+O\+\_\+\+W\+R\+I\+T\+E\+\_\+\+D\+IR}}}\mbox{\label{physfs_8h_a50dba13af51214897c867a123f74afeda78a43f3de727ea7594a9a143ed252e52}} 
P\+H\+Y\+S\+F\+S\+\_\+\+E\+R\+R\+\_\+\+N\+O\+\_\+\+W\+R\+I\+T\+E\+\_\+\+D\+IR&No write dir has been specified. \\
\hline

\raisebox{\heightof{T}}[0pt][0pt]{\index{P\+H\+Y\+S\+F\+S\+\_\+\+E\+R\+R\+\_\+\+O\+P\+E\+N\+\_\+\+F\+O\+R\+\_\+\+R\+E\+A\+D\+I\+NG@{P\+H\+Y\+S\+F\+S\+\_\+\+E\+R\+R\+\_\+\+O\+P\+E\+N\+\_\+\+F\+O\+R\+\_\+\+R\+E\+A\+D\+I\+NG}!physfs.\+h@{physfs.\+h}}\index{physfs.\+h@{physfs.\+h}!P\+H\+Y\+S\+F\+S\+\_\+\+E\+R\+R\+\_\+\+O\+P\+E\+N\+\_\+\+F\+O\+R\+\_\+\+R\+E\+A\+D\+I\+NG@{P\+H\+Y\+S\+F\+S\+\_\+\+E\+R\+R\+\_\+\+O\+P\+E\+N\+\_\+\+F\+O\+R\+\_\+\+R\+E\+A\+D\+I\+NG}}}\mbox{\label{physfs_8h_a50dba13af51214897c867a123f74afeda30dc0b5b61c31ce2e5c15a995b7d03a8}} 
P\+H\+Y\+S\+F\+S\+\_\+\+E\+R\+R\+\_\+\+O\+P\+E\+N\+\_\+\+F\+O\+R\+\_\+\+R\+E\+A\+D\+I\+NG&Wrote to a file opened for reading. \\
\hline

\raisebox{\heightof{T}}[0pt][0pt]{\index{P\+H\+Y\+S\+F\+S\+\_\+\+E\+R\+R\+\_\+\+O\+P\+E\+N\+\_\+\+F\+O\+R\+\_\+\+W\+R\+I\+T\+I\+NG@{P\+H\+Y\+S\+F\+S\+\_\+\+E\+R\+R\+\_\+\+O\+P\+E\+N\+\_\+\+F\+O\+R\+\_\+\+W\+R\+I\+T\+I\+NG}!physfs.\+h@{physfs.\+h}}\index{physfs.\+h@{physfs.\+h}!P\+H\+Y\+S\+F\+S\+\_\+\+E\+R\+R\+\_\+\+O\+P\+E\+N\+\_\+\+F\+O\+R\+\_\+\+W\+R\+I\+T\+I\+NG@{P\+H\+Y\+S\+F\+S\+\_\+\+E\+R\+R\+\_\+\+O\+P\+E\+N\+\_\+\+F\+O\+R\+\_\+\+W\+R\+I\+T\+I\+NG}}}\mbox{\label{physfs_8h_a50dba13af51214897c867a123f74afeda56c0a5de581b0981376e2df0d77b995f}} 
P\+H\+Y\+S\+F\+S\+\_\+\+E\+R\+R\+\_\+\+O\+P\+E\+N\+\_\+\+F\+O\+R\+\_\+\+W\+R\+I\+T\+I\+NG&Read from a file opened for writing. \\
\hline

\raisebox{\heightof{T}}[0pt][0pt]{\index{P\+H\+Y\+S\+F\+S\+\_\+\+E\+R\+R\+\_\+\+N\+O\+T\+\_\+\+A\+\_\+\+F\+I\+LE@{P\+H\+Y\+S\+F\+S\+\_\+\+E\+R\+R\+\_\+\+N\+O\+T\+\_\+\+A\+\_\+\+F\+I\+LE}!physfs.\+h@{physfs.\+h}}\index{physfs.\+h@{physfs.\+h}!P\+H\+Y\+S\+F\+S\+\_\+\+E\+R\+R\+\_\+\+N\+O\+T\+\_\+\+A\+\_\+\+F\+I\+LE@{P\+H\+Y\+S\+F\+S\+\_\+\+E\+R\+R\+\_\+\+N\+O\+T\+\_\+\+A\+\_\+\+F\+I\+LE}}}\mbox{\label{physfs_8h_a50dba13af51214897c867a123f74afedac7308d464cbdeae33b3b46ef477380a4}} 
P\+H\+Y\+S\+F\+S\+\_\+\+E\+R\+R\+\_\+\+N\+O\+T\+\_\+\+A\+\_\+\+F\+I\+LE&Needed a file, got a directory (etc). \\
\hline

\raisebox{\heightof{T}}[0pt][0pt]{\index{P\+H\+Y\+S\+F\+S\+\_\+\+E\+R\+R\+\_\+\+R\+E\+A\+D\+\_\+\+O\+N\+LY@{P\+H\+Y\+S\+F\+S\+\_\+\+E\+R\+R\+\_\+\+R\+E\+A\+D\+\_\+\+O\+N\+LY}!physfs.\+h@{physfs.\+h}}\index{physfs.\+h@{physfs.\+h}!P\+H\+Y\+S\+F\+S\+\_\+\+E\+R\+R\+\_\+\+R\+E\+A\+D\+\_\+\+O\+N\+LY@{P\+H\+Y\+S\+F\+S\+\_\+\+E\+R\+R\+\_\+\+R\+E\+A\+D\+\_\+\+O\+N\+LY}}}\mbox{\label{physfs_8h_a50dba13af51214897c867a123f74afeda02204e5c7d56d8097ac926a0e3ed011b}} 
P\+H\+Y\+S\+F\+S\+\_\+\+E\+R\+R\+\_\+\+R\+E\+A\+D\+\_\+\+O\+N\+LY&Wrote to a read-\/only filesystem. \\
\hline

\raisebox{\heightof{T}}[0pt][0pt]{\index{P\+H\+Y\+S\+F\+S\+\_\+\+E\+R\+R\+\_\+\+C\+O\+R\+R\+U\+PT@{P\+H\+Y\+S\+F\+S\+\_\+\+E\+R\+R\+\_\+\+C\+O\+R\+R\+U\+PT}!physfs.\+h@{physfs.\+h}}\index{physfs.\+h@{physfs.\+h}!P\+H\+Y\+S\+F\+S\+\_\+\+E\+R\+R\+\_\+\+C\+O\+R\+R\+U\+PT@{P\+H\+Y\+S\+F\+S\+\_\+\+E\+R\+R\+\_\+\+C\+O\+R\+R\+U\+PT}}}\mbox{\label{physfs_8h_a50dba13af51214897c867a123f74afedadf796cd23b55fc711b50fc903526d02b}} 
P\+H\+Y\+S\+F\+S\+\_\+\+E\+R\+R\+\_\+\+C\+O\+R\+R\+U\+PT&Corrupted data encountered. \\
\hline

\raisebox{\heightof{T}}[0pt][0pt]{\index{P\+H\+Y\+S\+F\+S\+\_\+\+E\+R\+R\+\_\+\+S\+Y\+M\+L\+I\+N\+K\+\_\+\+L\+O\+OP@{P\+H\+Y\+S\+F\+S\+\_\+\+E\+R\+R\+\_\+\+S\+Y\+M\+L\+I\+N\+K\+\_\+\+L\+O\+OP}!physfs.\+h@{physfs.\+h}}\index{physfs.\+h@{physfs.\+h}!P\+H\+Y\+S\+F\+S\+\_\+\+E\+R\+R\+\_\+\+S\+Y\+M\+L\+I\+N\+K\+\_\+\+L\+O\+OP@{P\+H\+Y\+S\+F\+S\+\_\+\+E\+R\+R\+\_\+\+S\+Y\+M\+L\+I\+N\+K\+\_\+\+L\+O\+OP}}}\mbox{\label{physfs_8h_a50dba13af51214897c867a123f74afedac799c795f6aca95e170c3cb7ff145b2c}} 
P\+H\+Y\+S\+F\+S\+\_\+\+E\+R\+R\+\_\+\+S\+Y\+M\+L\+I\+N\+K\+\_\+\+L\+O\+OP&Infinite symbolic link loop. \\
\hline

\raisebox{\heightof{T}}[0pt][0pt]{\index{P\+H\+Y\+S\+F\+S\+\_\+\+E\+R\+R\+\_\+\+IO@{P\+H\+Y\+S\+F\+S\+\_\+\+E\+R\+R\+\_\+\+IO}!physfs.\+h@{physfs.\+h}}\index{physfs.\+h@{physfs.\+h}!P\+H\+Y\+S\+F\+S\+\_\+\+E\+R\+R\+\_\+\+IO@{P\+H\+Y\+S\+F\+S\+\_\+\+E\+R\+R\+\_\+\+IO}}}\mbox{\label{physfs_8h_a50dba13af51214897c867a123f74afeda18a8f0827d6fb21cecd5404cff88cab5}} 
P\+H\+Y\+S\+F\+S\+\_\+\+E\+R\+R\+\_\+\+IO&i/o error (hardware failure, etc). \\
\hline

\raisebox{\heightof{T}}[0pt][0pt]{\index{P\+H\+Y\+S\+F\+S\+\_\+\+E\+R\+R\+\_\+\+P\+E\+R\+M\+I\+S\+S\+I\+ON@{P\+H\+Y\+S\+F\+S\+\_\+\+E\+R\+R\+\_\+\+P\+E\+R\+M\+I\+S\+S\+I\+ON}!physfs.\+h@{physfs.\+h}}\index{physfs.\+h@{physfs.\+h}!P\+H\+Y\+S\+F\+S\+\_\+\+E\+R\+R\+\_\+\+P\+E\+R\+M\+I\+S\+S\+I\+ON@{P\+H\+Y\+S\+F\+S\+\_\+\+E\+R\+R\+\_\+\+P\+E\+R\+M\+I\+S\+S\+I\+ON}}}\mbox{\label{physfs_8h_a50dba13af51214897c867a123f74afedacc1abade7a5838284ad6959fe486199c}} 
P\+H\+Y\+S\+F\+S\+\_\+\+E\+R\+R\+\_\+\+P\+E\+R\+M\+I\+S\+S\+I\+ON&Permission denied. \\
\hline

\raisebox{\heightof{T}}[0pt][0pt]{\index{P\+H\+Y\+S\+F\+S\+\_\+\+E\+R\+R\+\_\+\+N\+O\+\_\+\+S\+P\+A\+CE@{P\+H\+Y\+S\+F\+S\+\_\+\+E\+R\+R\+\_\+\+N\+O\+\_\+\+S\+P\+A\+CE}!physfs.\+h@{physfs.\+h}}\index{physfs.\+h@{physfs.\+h}!P\+H\+Y\+S\+F\+S\+\_\+\+E\+R\+R\+\_\+\+N\+O\+\_\+\+S\+P\+A\+CE@{P\+H\+Y\+S\+F\+S\+\_\+\+E\+R\+R\+\_\+\+N\+O\+\_\+\+S\+P\+A\+CE}}}\mbox{\label{physfs_8h_a50dba13af51214897c867a123f74afedac1dced0099f8acd28c529883cf2cd894}} 
P\+H\+Y\+S\+F\+S\+\_\+\+E\+R\+R\+\_\+\+N\+O\+\_\+\+S\+P\+A\+CE&No space (disk full, over quota, etc) \\
\hline

\raisebox{\heightof{T}}[0pt][0pt]{\index{P\+H\+Y\+S\+F\+S\+\_\+\+E\+R\+R\+\_\+\+B\+A\+D\+\_\+\+F\+I\+L\+E\+N\+A\+ME@{P\+H\+Y\+S\+F\+S\+\_\+\+E\+R\+R\+\_\+\+B\+A\+D\+\_\+\+F\+I\+L\+E\+N\+A\+ME}!physfs.\+h@{physfs.\+h}}\index{physfs.\+h@{physfs.\+h}!P\+H\+Y\+S\+F\+S\+\_\+\+E\+R\+R\+\_\+\+B\+A\+D\+\_\+\+F\+I\+L\+E\+N\+A\+ME@{P\+H\+Y\+S\+F\+S\+\_\+\+E\+R\+R\+\_\+\+B\+A\+D\+\_\+\+F\+I\+L\+E\+N\+A\+ME}}}\mbox{\label{physfs_8h_a50dba13af51214897c867a123f74afedaa9cabd98b57c1d0c6f28f008070d8b34}} 
P\+H\+Y\+S\+F\+S\+\_\+\+E\+R\+R\+\_\+\+B\+A\+D\+\_\+\+F\+I\+L\+E\+N\+A\+ME&Filename is bogus/insecure. \\
\hline

\raisebox{\heightof{T}}[0pt][0pt]{\index{P\+H\+Y\+S\+F\+S\+\_\+\+E\+R\+R\+\_\+\+B\+U\+SY@{P\+H\+Y\+S\+F\+S\+\_\+\+E\+R\+R\+\_\+\+B\+U\+SY}!physfs.\+h@{physfs.\+h}}\index{physfs.\+h@{physfs.\+h}!P\+H\+Y\+S\+F\+S\+\_\+\+E\+R\+R\+\_\+\+B\+U\+SY@{P\+H\+Y\+S\+F\+S\+\_\+\+E\+R\+R\+\_\+\+B\+U\+SY}}}\mbox{\label{physfs_8h_a50dba13af51214897c867a123f74afeda81cb4cfda88fdac43ca6ec748f8eb380}} 
P\+H\+Y\+S\+F\+S\+\_\+\+E\+R\+R\+\_\+\+B\+U\+SY&Tried to modify a file the OS needs. \\
\hline

\raisebox{\heightof{T}}[0pt][0pt]{\index{P\+H\+Y\+S\+F\+S\+\_\+\+E\+R\+R\+\_\+\+D\+I\+R\+\_\+\+N\+O\+T\+\_\+\+E\+M\+P\+TY@{P\+H\+Y\+S\+F\+S\+\_\+\+E\+R\+R\+\_\+\+D\+I\+R\+\_\+\+N\+O\+T\+\_\+\+E\+M\+P\+TY}!physfs.\+h@{physfs.\+h}}\index{physfs.\+h@{physfs.\+h}!P\+H\+Y\+S\+F\+S\+\_\+\+E\+R\+R\+\_\+\+D\+I\+R\+\_\+\+N\+O\+T\+\_\+\+E\+M\+P\+TY@{P\+H\+Y\+S\+F\+S\+\_\+\+E\+R\+R\+\_\+\+D\+I\+R\+\_\+\+N\+O\+T\+\_\+\+E\+M\+P\+TY}}}\mbox{\label{physfs_8h_a50dba13af51214897c867a123f74afeda2ef70542e659b8393e217923c762922f}} 
P\+H\+Y\+S\+F\+S\+\_\+\+E\+R\+R\+\_\+\+D\+I\+R\+\_\+\+N\+O\+T\+\_\+\+E\+M\+P\+TY&Tried to delete dir with files in it. \\
\hline

\raisebox{\heightof{T}}[0pt][0pt]{\index{P\+H\+Y\+S\+F\+S\+\_\+\+E\+R\+R\+\_\+\+O\+S\+\_\+\+E\+R\+R\+OR@{P\+H\+Y\+S\+F\+S\+\_\+\+E\+R\+R\+\_\+\+O\+S\+\_\+\+E\+R\+R\+OR}!physfs.\+h@{physfs.\+h}}\index{physfs.\+h@{physfs.\+h}!P\+H\+Y\+S\+F\+S\+\_\+\+E\+R\+R\+\_\+\+O\+S\+\_\+\+E\+R\+R\+OR@{P\+H\+Y\+S\+F\+S\+\_\+\+E\+R\+R\+\_\+\+O\+S\+\_\+\+E\+R\+R\+OR}}}\mbox{\label{physfs_8h_a50dba13af51214897c867a123f74afedaab8102396aff3f07f975320a78e3be13}} 
P\+H\+Y\+S\+F\+S\+\_\+\+E\+R\+R\+\_\+\+O\+S\+\_\+\+E\+R\+R\+OR&Unspecified O\+S-\/level error. \\
\hline

\raisebox{\heightof{T}}[0pt][0pt]{\index{P\+H\+Y\+S\+F\+S\+\_\+\+E\+R\+R\+\_\+\+D\+U\+P\+L\+I\+C\+A\+TE@{P\+H\+Y\+S\+F\+S\+\_\+\+E\+R\+R\+\_\+\+D\+U\+P\+L\+I\+C\+A\+TE}!physfs.\+h@{physfs.\+h}}\index{physfs.\+h@{physfs.\+h}!P\+H\+Y\+S\+F\+S\+\_\+\+E\+R\+R\+\_\+\+D\+U\+P\+L\+I\+C\+A\+TE@{P\+H\+Y\+S\+F\+S\+\_\+\+E\+R\+R\+\_\+\+D\+U\+P\+L\+I\+C\+A\+TE}}}\mbox{\label{physfs_8h_a50dba13af51214897c867a123f74afedaf089c21761b1142e0f215843d2dceaa7}} 
P\+H\+Y\+S\+F\+S\+\_\+\+E\+R\+R\+\_\+\+D\+U\+P\+L\+I\+C\+A\+TE&Duplicate entry. \\
\hline

\raisebox{\heightof{T}}[0pt][0pt]{\index{P\+H\+Y\+S\+F\+S\+\_\+\+E\+R\+R\+\_\+\+B\+A\+D\+\_\+\+P\+A\+S\+S\+W\+O\+RD@{P\+H\+Y\+S\+F\+S\+\_\+\+E\+R\+R\+\_\+\+B\+A\+D\+\_\+\+P\+A\+S\+S\+W\+O\+RD}!physfs.\+h@{physfs.\+h}}\index{physfs.\+h@{physfs.\+h}!P\+H\+Y\+S\+F\+S\+\_\+\+E\+R\+R\+\_\+\+B\+A\+D\+\_\+\+P\+A\+S\+S\+W\+O\+RD@{P\+H\+Y\+S\+F\+S\+\_\+\+E\+R\+R\+\_\+\+B\+A\+D\+\_\+\+P\+A\+S\+S\+W\+O\+RD}}}\mbox{\label{physfs_8h_a50dba13af51214897c867a123f74afeda1782515d1d7babfb7201c2dbc59b507f}} 
P\+H\+Y\+S\+F\+S\+\_\+\+E\+R\+R\+\_\+\+B\+A\+D\+\_\+\+P\+A\+S\+S\+W\+O\+RD&Bad password. \\
\hline

\raisebox{\heightof{T}}[0pt][0pt]{\index{P\+H\+Y\+S\+F\+S\+\_\+\+E\+R\+R\+\_\+\+A\+P\+P\+\_\+\+C\+A\+L\+L\+B\+A\+CK@{P\+H\+Y\+S\+F\+S\+\_\+\+E\+R\+R\+\_\+\+A\+P\+P\+\_\+\+C\+A\+L\+L\+B\+A\+CK}!physfs.\+h@{physfs.\+h}}\index{physfs.\+h@{physfs.\+h}!P\+H\+Y\+S\+F\+S\+\_\+\+E\+R\+R\+\_\+\+A\+P\+P\+\_\+\+C\+A\+L\+L\+B\+A\+CK@{P\+H\+Y\+S\+F\+S\+\_\+\+E\+R\+R\+\_\+\+A\+P\+P\+\_\+\+C\+A\+L\+L\+B\+A\+CK}}}\mbox{\label{physfs_8h_a50dba13af51214897c867a123f74afeda6161bfc88154640b7fc9bb950111f7ad}} 
P\+H\+Y\+S\+F\+S\+\_\+\+E\+R\+R\+\_\+\+A\+P\+P\+\_\+\+C\+A\+L\+L\+B\+A\+CK&Application callback reported error. \\
\hline

\end{DoxyEnumFields}
\mbox{\label{physfs_8h_ac83274ef7d83801a80563476516bfa15}} 
\index{physfs.\+h@{physfs.\+h}!P\+H\+Y\+S\+F\+S\+\_\+\+File\+Type@{P\+H\+Y\+S\+F\+S\+\_\+\+File\+Type}}
\index{P\+H\+Y\+S\+F\+S\+\_\+\+File\+Type@{P\+H\+Y\+S\+F\+S\+\_\+\+File\+Type}!physfs.\+h@{physfs.\+h}}
\subsubsection{P\+H\+Y\+S\+F\+S\+\_\+\+File\+Type}
{\footnotesize\ttfamily enum \textbf{ P\+H\+Y\+S\+F\+S\+\_\+\+File\+Type}}



Type of a File. 

Possible types of a file.

\begin{DoxySeeAlso}{See also}
\doxyref{P\+H\+Y\+S\+F\+S\+\_\+stat}{p.}{physfs_8h_a7f5e23675c50ffe51ad00cceb5a65348} 
\end{DoxySeeAlso}
\begin{DoxyEnumFields}{Enumerator}
\raisebox{\heightof{T}}[0pt][0pt]{\index{P\+H\+Y\+S\+F\+S\+\_\+\+F\+I\+L\+E\+T\+Y\+P\+E\+\_\+\+R\+E\+G\+U\+L\+AR@{P\+H\+Y\+S\+F\+S\+\_\+\+F\+I\+L\+E\+T\+Y\+P\+E\+\_\+\+R\+E\+G\+U\+L\+AR}!physfs.\+h@{physfs.\+h}}\index{physfs.\+h@{physfs.\+h}!P\+H\+Y\+S\+F\+S\+\_\+\+F\+I\+L\+E\+T\+Y\+P\+E\+\_\+\+R\+E\+G\+U\+L\+AR@{P\+H\+Y\+S\+F\+S\+\_\+\+F\+I\+L\+E\+T\+Y\+P\+E\+\_\+\+R\+E\+G\+U\+L\+AR}}}\mbox{\label{physfs_8h_ac83274ef7d83801a80563476516bfa15ae99e7a2bad864791c680eac138d9fb3a}} 
P\+H\+Y\+S\+F\+S\+\_\+\+F\+I\+L\+E\+T\+Y\+P\+E\+\_\+\+R\+E\+G\+U\+L\+AR&a normal file \\
\hline

\raisebox{\heightof{T}}[0pt][0pt]{\index{P\+H\+Y\+S\+F\+S\+\_\+\+F\+I\+L\+E\+T\+Y\+P\+E\+\_\+\+D\+I\+R\+E\+C\+T\+O\+RY@{P\+H\+Y\+S\+F\+S\+\_\+\+F\+I\+L\+E\+T\+Y\+P\+E\+\_\+\+D\+I\+R\+E\+C\+T\+O\+RY}!physfs.\+h@{physfs.\+h}}\index{physfs.\+h@{physfs.\+h}!P\+H\+Y\+S\+F\+S\+\_\+\+F\+I\+L\+E\+T\+Y\+P\+E\+\_\+\+D\+I\+R\+E\+C\+T\+O\+RY@{P\+H\+Y\+S\+F\+S\+\_\+\+F\+I\+L\+E\+T\+Y\+P\+E\+\_\+\+D\+I\+R\+E\+C\+T\+O\+RY}}}\mbox{\label{physfs_8h_ac83274ef7d83801a80563476516bfa15a3ca9b647070a1b72496940026649bd02}} 
P\+H\+Y\+S\+F\+S\+\_\+\+F\+I\+L\+E\+T\+Y\+P\+E\+\_\+\+D\+I\+R\+E\+C\+T\+O\+RY&a directory \\
\hline

\raisebox{\heightof{T}}[0pt][0pt]{\index{P\+H\+Y\+S\+F\+S\+\_\+\+F\+I\+L\+E\+T\+Y\+P\+E\+\_\+\+S\+Y\+M\+L\+I\+NK@{P\+H\+Y\+S\+F\+S\+\_\+\+F\+I\+L\+E\+T\+Y\+P\+E\+\_\+\+S\+Y\+M\+L\+I\+NK}!physfs.\+h@{physfs.\+h}}\index{physfs.\+h@{physfs.\+h}!P\+H\+Y\+S\+F\+S\+\_\+\+F\+I\+L\+E\+T\+Y\+P\+E\+\_\+\+S\+Y\+M\+L\+I\+NK@{P\+H\+Y\+S\+F\+S\+\_\+\+F\+I\+L\+E\+T\+Y\+P\+E\+\_\+\+S\+Y\+M\+L\+I\+NK}}}\mbox{\label{physfs_8h_ac83274ef7d83801a80563476516bfa15a98794e6fd60557ce50623f81e86e7663}} 
P\+H\+Y\+S\+F\+S\+\_\+\+F\+I\+L\+E\+T\+Y\+P\+E\+\_\+\+S\+Y\+M\+L\+I\+NK&a symlink \\
\hline

\raisebox{\heightof{T}}[0pt][0pt]{\index{P\+H\+Y\+S\+F\+S\+\_\+\+F\+I\+L\+E\+T\+Y\+P\+E\+\_\+\+O\+T\+H\+ER@{P\+H\+Y\+S\+F\+S\+\_\+\+F\+I\+L\+E\+T\+Y\+P\+E\+\_\+\+O\+T\+H\+ER}!physfs.\+h@{physfs.\+h}}\index{physfs.\+h@{physfs.\+h}!P\+H\+Y\+S\+F\+S\+\_\+\+F\+I\+L\+E\+T\+Y\+P\+E\+\_\+\+O\+T\+H\+ER@{P\+H\+Y\+S\+F\+S\+\_\+\+F\+I\+L\+E\+T\+Y\+P\+E\+\_\+\+O\+T\+H\+ER}}}\mbox{\label{physfs_8h_ac83274ef7d83801a80563476516bfa15a83e202bbeee9274a8e746dde9ab5fef8}} 
P\+H\+Y\+S\+F\+S\+\_\+\+F\+I\+L\+E\+T\+Y\+P\+E\+\_\+\+O\+T\+H\+ER&something completely different like a device \\
\hline

\end{DoxyEnumFields}


\subsection{Function Documentation}
\mbox{\label{physfs_8h_a0956d926822291a23ee540c2ffefa1af}} 
\index{physfs.\+h@{physfs.\+h}!P\+H\+Y\+S\+F\+S\+\_\+add\+To\+Search\+Path@{P\+H\+Y\+S\+F\+S\+\_\+add\+To\+Search\+Path}}
\index{P\+H\+Y\+S\+F\+S\+\_\+add\+To\+Search\+Path@{P\+H\+Y\+S\+F\+S\+\_\+add\+To\+Search\+Path}!physfs.\+h@{physfs.\+h}}
\subsubsection{P\+H\+Y\+S\+F\+S\+\_\+add\+To\+Search\+Path()}
{\footnotesize\ttfamily int P\+H\+Y\+S\+F\+S\+\_\+add\+To\+Search\+Path (\begin{DoxyParamCaption}\item[{const char $\ast$}]{new\+Dir,  }\item[{int}]{append\+To\+Path }\end{DoxyParamCaption})}



Add an archive or directory to the search path. 

\begin{DoxyRefDesc}{Deprecated}
\item[\textbf{ Deprecated}]As of Physics\+FS 2.\+0, use \doxyref{P\+H\+Y\+S\+F\+S\+\_\+mount()}{p.}{physfs_8h_a8eb320e9af03dcdb4c05bbff3ea604d4} instead. This function just wraps it anyhow.\end{DoxyRefDesc}


This function is equivalent to\+:


\begin{DoxyCode}
PHYSFS_mount(newDir, NULL, appendToPath);
\end{DoxyCode}


You must use this and not P\+H\+Y\+S\+F\+S\+\_\+mount if binary compatibility with Physics\+FS 1.\+0 is important (which it may not be for many people).

\begin{DoxySeeAlso}{See also}
\doxyref{P\+H\+Y\+S\+F\+S\+\_\+mount}{p.}{physfs_8h_a8eb320e9af03dcdb4c05bbff3ea604d4} 

\doxyref{P\+H\+Y\+S\+F\+S\+\_\+remove\+From\+Search\+Path}{p.}{physfs_8h_a1e4ed59d6c80b8fb28904723cfd5b510} 

\doxyref{P\+H\+Y\+S\+F\+S\+\_\+get\+Search\+Path}{p.}{physfs_8h_ac738531e9c7e5ca3797b64985c103cf4} 
\end{DoxySeeAlso}
\mbox{\label{physfs_8h_a3845b57434e52e82f6ae8b6a0fe13f26}} 
\index{physfs.\+h@{physfs.\+h}!P\+H\+Y\+S\+F\+S\+\_\+case\+Fold@{P\+H\+Y\+S\+F\+S\+\_\+case\+Fold}}
\index{P\+H\+Y\+S\+F\+S\+\_\+case\+Fold@{P\+H\+Y\+S\+F\+S\+\_\+case\+Fold}!physfs.\+h@{physfs.\+h}}
\subsubsection{P\+H\+Y\+S\+F\+S\+\_\+case\+Fold()}
{\footnotesize\ttfamily int P\+H\+Y\+S\+F\+S\+\_\+case\+Fold (\begin{DoxyParamCaption}\item[{const \textbf{ P\+H\+Y\+S\+F\+S\+\_\+uint32}}]{from,  }\item[{\textbf{ P\+H\+Y\+S\+F\+S\+\_\+uint32} $\ast$}]{to }\end{DoxyParamCaption})}



\char`\"{}\+Fold\char`\"{} a Unicode codepoint to a lowercase equivalent. 

(This is for limited, hardcore use. If you don\textquotesingle{}t immediately see a need for it, you can probably ignore this forever.)

This will convert a Unicode codepoint into its lowercase equivalent. Bogus codepoints and codepoints without a lowercase equivalent will be returned unconverted.

Note that you might get multiple codepoints in return! The German Eszett, for example, will fold down to two lowercase latin \textquotesingle{}s\textquotesingle{} codepoints. The theory is that if you fold two strings, one with an Eszett and one with \char`\"{}\+S\+S\char`\"{} down, they will match.

\begin{DoxyWarning}{Warning}
Anyone that is a student of Unicode knows about the \char`\"{}\+Turkish I\char`\"{} problem. This A\+PI does not handle it. Assume this one letter in all of Unicode will definitely fold sort of incorrectly. If you don\textquotesingle{}t know what this is about, you can probably ignore this problem for most of the planet, but perfection is impossible.
\end{DoxyWarning}

\begin{DoxyParams}{Parameters}
{\em from} & The codepoint to fold. \\
\hline
{\em to} & Buffer to store the folded codepoint values into. This should point to space for at least 3 P\+H\+Y\+S\+F\+S\+\_\+uint32 slots. \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
The number of codepoints the folding produced. Between 1 and 3. 
\end{DoxyReturn}
\mbox{\label{physfs_8h_a6822f8ff10073e855a1c3a6485b882f2}} 
\index{physfs.\+h@{physfs.\+h}!P\+H\+Y\+S\+F\+S\+\_\+close@{P\+H\+Y\+S\+F\+S\+\_\+close}}
\index{P\+H\+Y\+S\+F\+S\+\_\+close@{P\+H\+Y\+S\+F\+S\+\_\+close}!physfs.\+h@{physfs.\+h}}
\subsubsection{P\+H\+Y\+S\+F\+S\+\_\+close()}
{\footnotesize\ttfamily int P\+H\+Y\+S\+F\+S\+\_\+close (\begin{DoxyParamCaption}\item[{\textbf{ P\+H\+Y\+S\+F\+S\+\_\+\+File} $\ast$}]{handle }\end{DoxyParamCaption})}



Close a Physics\+FS filehandle. 

This call is capable of failing if the operating system was buffering writes to the physical media, and, now forced to write those changes to physical media, can not store the data for some reason. In such a case, the filehandle stays open. A well-\/written program should A\+L\+W\+A\+YS check the return value from the close call in addition to every writing call!


\begin{DoxyParams}{Parameters}
{\em handle} & handle returned from P\+H\+Y\+S\+F\+S\+\_\+open$\ast$(). \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
nonzero on success, zero on error. Use \doxyref{P\+H\+Y\+S\+F\+S\+\_\+get\+Last\+Error\+Code()}{p.}{physfs_8h_ae916a873aae2cf6b6e09d733cd1b3f4b} to obtain the specific error.
\end{DoxyReturn}
\begin{DoxySeeAlso}{See also}
\doxyref{P\+H\+Y\+S\+F\+S\+\_\+open\+Read}{p.}{physfs_8h_a5e38a425bb0b44c09ec25b105f770c63} 

\doxyref{P\+H\+Y\+S\+F\+S\+\_\+open\+Write}{p.}{physfs_8h_abbf92d66c6cb82d0ede969aa2c964fba} 

\doxyref{P\+H\+Y\+S\+F\+S\+\_\+open\+Append}{p.}{physfs_8h_abeeca12e2fe7c5f68cbd67e2e5cafa3d} 
\end{DoxySeeAlso}
\mbox{\label{physfs_8h_aa465c9b58e5020f503085d433a413b5b}} 
\index{physfs.\+h@{physfs.\+h}!P\+H\+Y\+S\+F\+S\+\_\+deinit@{P\+H\+Y\+S\+F\+S\+\_\+deinit}}
\index{P\+H\+Y\+S\+F\+S\+\_\+deinit@{P\+H\+Y\+S\+F\+S\+\_\+deinit}!physfs.\+h@{physfs.\+h}}
\subsubsection{P\+H\+Y\+S\+F\+S\+\_\+deinit()}
{\footnotesize\ttfamily int P\+H\+Y\+S\+F\+S\+\_\+deinit (\begin{DoxyParamCaption}\item[{void}]{ }\end{DoxyParamCaption})}



Deinitialize the Physics\+FS library. 

This closes any files opened via Physics\+FS, blanks the search/write paths, frees memory, and invalidates all of your file handles.

Note that this call can F\+A\+IL if there\textquotesingle{}s a file open for writing that refuses to close (for example, the underlying operating system was buffering writes to network filesystem, and the fileserver has crashed, or a hard drive has failed, etc). It is usually best to close all write handles yourself before calling this function, so that you can gracefully handle a specific failure.

Once successfully deinitialized, \doxyref{P\+H\+Y\+S\+F\+S\+\_\+init()}{p.}{physfs_8h_a61b94cac8e65267afb8a5f2344e60dd1} can be called again to restart the subsystem. All default A\+PI states are restored at this point, with the exception of any custom allocator you might have specified, which survives between initializations.

\begin{DoxyReturn}{Returns}
nonzero on success, zero on error. Specifics of the error can be gleaned from \doxyref{P\+H\+Y\+S\+F\+S\+\_\+get\+Last\+Error()}{p.}{physfs_8h_a9f78e4ab560885fd10202988d2fff1b6}. If failure, state of Phys\+FS is undefined, and probably badly screwed up.
\end{DoxyReturn}
\begin{DoxySeeAlso}{See also}
\doxyref{P\+H\+Y\+S\+F\+S\+\_\+init}{p.}{physfs_8h_a61b94cac8e65267afb8a5f2344e60dd1} 

\doxyref{P\+H\+Y\+S\+F\+S\+\_\+is\+Init}{p.}{physfs_8h_a6154be7bfa5d924476356a9fbd0d8223} 
\end{DoxySeeAlso}
\mbox{\label{physfs_8h_a27a939bce4c1132bacdfcb3d3cc29e37}} 
\index{physfs.\+h@{physfs.\+h}!P\+H\+Y\+S\+F\+S\+\_\+delete@{P\+H\+Y\+S\+F\+S\+\_\+delete}}
\index{P\+H\+Y\+S\+F\+S\+\_\+delete@{P\+H\+Y\+S\+F\+S\+\_\+delete}!physfs.\+h@{physfs.\+h}}
\subsubsection{P\+H\+Y\+S\+F\+S\+\_\+delete()}
{\footnotesize\ttfamily int P\+H\+Y\+S\+F\+S\+\_\+delete (\begin{DoxyParamCaption}\item[{const char $\ast$}]{filename }\end{DoxyParamCaption})}



Delete a file or directory. 

(filename) is specified in platform-\/independent notation in relation to the write dir.

A directory must be empty before this call can delete it.

Deleting a symlink will remove the link, not what it points to, regardless of whether you \char`\"{}permit\+Sym\+Links\char`\"{} or not.

So if you\textquotesingle{}ve got the write dir set to \char`\"{}\+C\+:\textbackslash{}mygame\textbackslash{}writedir\char`\"{} and call P\+H\+Y\+S\+F\+S\+\_\+delete(\char`\"{}downloads/maps/level1.\+map\char`\"{}) then the file \char`\"{}\+C\+:\textbackslash{}mygame\textbackslash{}writedir\textbackslash{}downloads\textbackslash{}maps\textbackslash{}level1.\+map\char`\"{} is removed from the physical filesystem, if it exists and the operating system permits the deletion.

Note that on Unix systems, deleting a file may be successful, but the actual file won\textquotesingle{}t be removed until all processes that have an open filehandle to it (including your program) close their handles.

Chances are, the bits that make up the file still exist, they are just made available to be written over at a later point. Don\textquotesingle{}t consider this a security method or anything. \+:)


\begin{DoxyParams}{Parameters}
{\em filename} & Filename to delete. \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
nonzero on success, zero on error. Use \doxyref{P\+H\+Y\+S\+F\+S\+\_\+get\+Last\+Error\+Code()}{p.}{physfs_8h_ae916a873aae2cf6b6e09d733cd1b3f4b} to obtain the specific error. 
\end{DoxyReturn}
\mbox{\label{physfs_8h_abbc7cce9112c5ddc2f3a9ad5d0edf6e0}} 
\index{physfs.\+h@{physfs.\+h}!P\+H\+Y\+S\+F\+S\+\_\+deregister\+Archiver@{P\+H\+Y\+S\+F\+S\+\_\+deregister\+Archiver}}
\index{P\+H\+Y\+S\+F\+S\+\_\+deregister\+Archiver@{P\+H\+Y\+S\+F\+S\+\_\+deregister\+Archiver}!physfs.\+h@{physfs.\+h}}
\subsubsection{P\+H\+Y\+S\+F\+S\+\_\+deregister\+Archiver()}
{\footnotesize\ttfamily int P\+H\+Y\+S\+F\+S\+\_\+deregister\+Archiver (\begin{DoxyParamCaption}\item[{const char $\ast$}]{ext }\end{DoxyParamCaption})}



Remove an archiver from the system. 

If for some reason, you only need your previously-\/registered archiver to live for a portion of your app\textquotesingle{}s lifetime, you can remove it from the system once you\textquotesingle{}re done with it through this function.

This fails if there are any archives still open that use this archiver.

This function can also remove internally-\/supplied archivers, like .zip support or whatnot. This could be useful in some situations, like disabling support for them outright or overriding them with your own implementation. Once an internal archiver is disabled like this, Physics\+FS provides no mechanism to recover them, short of calling \doxyref{P\+H\+Y\+S\+F\+S\+\_\+deinit()}{p.}{physfs_8h_aa465c9b58e5020f503085d433a413b5b} and \doxyref{P\+H\+Y\+S\+F\+S\+\_\+init()}{p.}{physfs_8h_a61b94cac8e65267afb8a5f2344e60dd1} again.

\doxyref{P\+H\+Y\+S\+F\+S\+\_\+deinit()}{p.}{physfs_8h_aa465c9b58e5020f503085d433a413b5b} will automatically deregister all archivers, so you don\textquotesingle{}t need to explicitly deregister yours if you otherwise shut down cleanly.


\begin{DoxyParams}{Parameters}
{\em ext} & Filename extension that the archiver handles. \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
Zero on error, non-\/zero on success.
\end{DoxyReturn}
\begin{DoxySeeAlso}{See also}
\doxyref{P\+H\+Y\+S\+F\+S\+\_\+\+Archiver}{p.}{structPHYSFS__Archiver} 

\doxyref{P\+H\+Y\+S\+F\+S\+\_\+register\+Archiver}{p.}{physfs_8h_ace0ecda857dc622e2d005af02972237d} 
\end{DoxySeeAlso}
\mbox{\label{physfs_8h_a33085cbbf18ba7eb659cf2a43d6793ba}} 
\index{physfs.\+h@{physfs.\+h}!P\+H\+Y\+S\+F\+S\+\_\+enumerate@{P\+H\+Y\+S\+F\+S\+\_\+enumerate}}
\index{P\+H\+Y\+S\+F\+S\+\_\+enumerate@{P\+H\+Y\+S\+F\+S\+\_\+enumerate}!physfs.\+h@{physfs.\+h}}
\subsubsection{P\+H\+Y\+S\+F\+S\+\_\+enumerate()}
{\footnotesize\ttfamily int P\+H\+Y\+S\+F\+S\+\_\+enumerate (\begin{DoxyParamCaption}\item[{const char $\ast$}]{dir,  }\item[{\textbf{ P\+H\+Y\+S\+F\+S\+\_\+\+Enumerate\+Callback}}]{c,  }\item[{void $\ast$}]{d }\end{DoxyParamCaption})}



Get a file listing of a search path\textquotesingle{}s directory, using an application-\/defined callback, with errors reported. 

Internally, \doxyref{P\+H\+Y\+S\+F\+S\+\_\+enumerate\+Files()}{p.}{physfs_8h_a0f4ae950c2dae0735a91263ddd20fbf4} just calls this function and then builds a list before returning to the application, so functionality is identical except for how the information is represented to the application.

Unlike \doxyref{P\+H\+Y\+S\+F\+S\+\_\+enumerate\+Files()}{p.}{physfs_8h_a0f4ae950c2dae0735a91263ddd20fbf4}, this function does not return an array. Rather, it calls a function specified by the application once per element of the search path\+:


\begin{DoxyCode}
\textcolor{keyword}{static} \textcolor{keywordtype}{int} printDir(\textcolor{keywordtype}{void} *data, \textcolor{keyword}{const} \textcolor{keywordtype}{char} *origdir, \textcolor{keyword}{const} \textcolor{keywordtype}{char} *fname)
\{
    printf(\textcolor{stringliteral}{" * We've got [%s] in [%s].\(\backslash\)n"}, fname, origdir);
    \textcolor{keywordflow}{return} 1;  \textcolor{comment}{// give me more data, please.}
\}

\textcolor{comment}{// ...}
PHYSFS_enumerate(\textcolor{stringliteral}{"/some/path"}, printDir, NULL);
\end{DoxyCode}


Items sent to the callback are not guaranteed to be in any order whatsoever. There is no sorting done at this level, and if you need that, you should probably use \doxyref{P\+H\+Y\+S\+F\+S\+\_\+enumerate\+Files()}{p.}{physfs_8h_a0f4ae950c2dae0735a91263ddd20fbf4} instead, which guarantees alphabetical sorting. This form reports whatever is discovered in each archive before moving on to the next. Even within one archive, we can\textquotesingle{}t guarantee what order it will discover data. {\itshape Any sorting you find in these callbacks is just pure luck. Do not rely on it.} As this walks the entire list of archives, you may receive duplicate filenames.

This A\+PI and the callbacks themselves are capable of reporting errors. Prior to this A\+PI, callbacks had to accept every enumerated item, even if they were only looking for a specific thing and wanted to stop after that, or had a serious error and couldn\textquotesingle{}t alert anyone. Furthermore, if Physics\+FS itself had a problem (disk error or whatnot), it couldn\textquotesingle{}t report it to the calling app, it would just have to skip items or stop enumerating outright, and the caller wouldn\textquotesingle{}t know it had lost some data along the way.

Now the caller can be sure it got a complete data set, and its callback has control if it wants enumeration to stop early. See the documentation for P\+H\+Y\+S\+F\+S\+\_\+\+Enumerate\+Callback for details on how your callback should behave.


\begin{DoxyParams}{Parameters}
{\em dir} & Directory, in platform-\/independent notation, to enumerate. \\
\hline
{\em c} & Callback function to notify about search path elements. \\
\hline
{\em d} & Application-\/defined data passed to callback. Can be N\+U\+LL. \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
non-\/zero on success, zero on failure. Use \doxyref{P\+H\+Y\+S\+F\+S\+\_\+get\+Last\+Error\+Code()}{p.}{physfs_8h_ae916a873aae2cf6b6e09d733cd1b3f4b} to obtain the specific error. If the callback returns P\+H\+Y\+S\+F\+S\+\_\+\+E\+N\+U\+M\+\_\+\+S\+T\+OP to stop early, this will be considered success. Callbacks returning P\+H\+Y\+S\+F\+S\+\_\+\+E\+N\+U\+M\+\_\+\+E\+R\+R\+OR will make this function return zero and set the error code to P\+H\+Y\+S\+F\+S\+\_\+\+E\+R\+R\+\_\+\+A\+P\+P\+\_\+\+C\+A\+L\+L\+B\+A\+CK.
\end{DoxyReturn}
\begin{DoxySeeAlso}{See also}
\doxyref{P\+H\+Y\+S\+F\+S\+\_\+\+Enumerate\+Callback}{p.}{physfs_8h_a1e72dbc92c0decdca218c8a9a658e788} 

\doxyref{P\+H\+Y\+S\+F\+S\+\_\+enumerate\+Files}{p.}{physfs_8h_a0f4ae950c2dae0735a91263ddd20fbf4} 
\end{DoxySeeAlso}
\mbox{\label{physfs_8h_a0f4ae950c2dae0735a91263ddd20fbf4}} 
\index{physfs.\+h@{physfs.\+h}!P\+H\+Y\+S\+F\+S\+\_\+enumerate\+Files@{P\+H\+Y\+S\+F\+S\+\_\+enumerate\+Files}}
\index{P\+H\+Y\+S\+F\+S\+\_\+enumerate\+Files@{P\+H\+Y\+S\+F\+S\+\_\+enumerate\+Files}!physfs.\+h@{physfs.\+h}}
\subsubsection{P\+H\+Y\+S\+F\+S\+\_\+enumerate\+Files()}
{\footnotesize\ttfamily char $\ast$$\ast$ P\+H\+Y\+S\+F\+S\+\_\+enumerate\+Files (\begin{DoxyParamCaption}\item[{const char $\ast$}]{dir }\end{DoxyParamCaption})}



Get a file listing of a search path\textquotesingle{}s directory. 

\begin{DoxyWarning}{Warning}
In Physics\+FS versions prior to 2.\+1, this function would return as many items as it could in the face of a failure condition (out of memory, disk i/o error, etc). Since this meant apps couldn\textquotesingle{}t distinguish between complete success and partial failure, and since the function could always return N\+U\+LL to report catastrophic failures anyway, in Physics\+FS 2.\+1 this function\textquotesingle{}s policy changed\+: it will either return a list of complete results or it will return N\+U\+LL for any failure of any kind, so we can guarantee that the enumeration ran to completion and has no gaps in its results.
\end{DoxyWarning}
Matching directories are interpolated. That is, if \char`\"{}\+C\+:\textbackslash{}mydir\char`\"{} is in the search path and contains a directory \char`\"{}savegames\char`\"{} that contains \char`\"{}x.\+sav\char`\"{}, \char`\"{}y.\+sav\char`\"{}, and \char`\"{}z.\+sav\char`\"{}, and there is also a \char`\"{}\+C\+:\textbackslash{}userdir\char`\"{} in the search path that has a \char`\"{}savegames\char`\"{} subdirectory with \char`\"{}w.\+sav\char`\"{}, then the following code\+:


\begin{DoxyCode}
\textcolor{keywordtype}{char} **rc = PHYSFS_enumerateFiles(\textcolor{stringliteral}{"savegames"});
\textcolor{keywordtype}{char} **i;

\textcolor{keywordflow}{for} (i = rc; *i != NULL; i++)
    printf(\textcolor{stringliteral}{" * We've got [%s].\(\backslash\)n"}, *i);

PHYSFS_freeList(rc);
\end{DoxyCode}


...will print\+:

\begin{DoxyVerb}* We've got [x.sav].
* We've got [y.sav].
* We've got [z.sav].
* We've got [w.sav].\end{DoxyVerb}


Feel free to sort the list however you like. However, the returned data will always contain no duplicates, and will be always sorted in alphabetic (rather\+: case-\/sensitive Unicode) order for you.

Don\textquotesingle{}t forget to call \doxyref{P\+H\+Y\+S\+F\+S\+\_\+free\+List()}{p.}{physfs_8h_af6aeb2ffdcee44f02cf380da62462b05} with the return value from this function when you are done with it.


\begin{DoxyParams}{Parameters}
{\em dir} & directory in platform-\/independent notation to enumerate. \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
Null-\/terminated array of null-\/terminated strings, or N\+U\+LL for failure cases.
\end{DoxyReturn}
\begin{DoxySeeAlso}{See also}
\doxyref{P\+H\+Y\+S\+F\+S\+\_\+enumerate}{p.}{physfs_8h_a33085cbbf18ba7eb659cf2a43d6793ba} 
\end{DoxySeeAlso}
\mbox{\label{physfs_8h_a9d3541369a4eb0a95f946bc3f4103dfb}} 
\index{physfs.\+h@{physfs.\+h}!P\+H\+Y\+S\+F\+S\+\_\+enumerate\+Files\+Callback@{P\+H\+Y\+S\+F\+S\+\_\+enumerate\+Files\+Callback}}
\index{P\+H\+Y\+S\+F\+S\+\_\+enumerate\+Files\+Callback@{P\+H\+Y\+S\+F\+S\+\_\+enumerate\+Files\+Callback}!physfs.\+h@{physfs.\+h}}
\subsubsection{P\+H\+Y\+S\+F\+S\+\_\+enumerate\+Files\+Callback()}
{\footnotesize\ttfamily void P\+H\+Y\+S\+F\+S\+\_\+enumerate\+Files\+Callback (\begin{DoxyParamCaption}\item[{const char $\ast$}]{dir,  }\item[{\textbf{ P\+H\+Y\+S\+F\+S\+\_\+\+Enum\+Files\+Callback}}]{c,  }\item[{void $\ast$}]{d }\end{DoxyParamCaption})}



Get a file listing of a search path\textquotesingle{}s directory, using an application-\/defined callback. 

\begin{DoxyRefDesc}{Deprecated}
\item[\textbf{ Deprecated}]As of Physics\+FS 2.\+1, use \doxyref{P\+H\+Y\+S\+F\+S\+\_\+enumerate()}{p.}{physfs_8h_a33085cbbf18ba7eb659cf2a43d6793ba} instead. This function has no way to report errors (or to have the callback signal an error or request a stop), so if data will be lost, your callback has no way to direct the process, and your calling app has no way to know.\end{DoxyRefDesc}


As of Physics\+FS 2.\+1, this function just wraps \doxyref{P\+H\+Y\+S\+F\+S\+\_\+enumerate()}{p.}{physfs_8h_a33085cbbf18ba7eb659cf2a43d6793ba} and ignores errors. Consider using \doxyref{P\+H\+Y\+S\+F\+S\+\_\+enumerate()}{p.}{physfs_8h_a33085cbbf18ba7eb659cf2a43d6793ba} or \doxyref{P\+H\+Y\+S\+F\+S\+\_\+enumerate\+Files()}{p.}{physfs_8h_a0f4ae950c2dae0735a91263ddd20fbf4} instead.

\begin{DoxySeeAlso}{See also}
\doxyref{P\+H\+Y\+S\+F\+S\+\_\+enumerate}{p.}{physfs_8h_a33085cbbf18ba7eb659cf2a43d6793ba} 

\doxyref{P\+H\+Y\+S\+F\+S\+\_\+enumerate\+Files}{p.}{physfs_8h_a0f4ae950c2dae0735a91263ddd20fbf4} 

\doxyref{P\+H\+Y\+S\+F\+S\+\_\+\+Enum\+Files\+Callback}{p.}{physfs_8h_a51c1e0145502aeaf080973d308d33c6a} 
\end{DoxySeeAlso}
\mbox{\label{physfs_8h_a6d7ac838797951323072060392645dbe}} 
\index{physfs.\+h@{physfs.\+h}!P\+H\+Y\+S\+F\+S\+\_\+eof@{P\+H\+Y\+S\+F\+S\+\_\+eof}}
\index{P\+H\+Y\+S\+F\+S\+\_\+eof@{P\+H\+Y\+S\+F\+S\+\_\+eof}!physfs.\+h@{physfs.\+h}}
\subsubsection{P\+H\+Y\+S\+F\+S\+\_\+eof()}
{\footnotesize\ttfamily int P\+H\+Y\+S\+F\+S\+\_\+eof (\begin{DoxyParamCaption}\item[{\textbf{ P\+H\+Y\+S\+F\+S\+\_\+\+File} $\ast$}]{handle }\end{DoxyParamCaption})}



Check for end-\/of-\/file state on a Physics\+FS filehandle. 

Determine if the end of file has been reached in a Physics\+FS filehandle.


\begin{DoxyParams}{Parameters}
{\em handle} & handle returned from \doxyref{P\+H\+Y\+S\+F\+S\+\_\+open\+Read()}{p.}{physfs_8h_a5e38a425bb0b44c09ec25b105f770c63}. \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
nonzero if E\+OF, zero if not.
\end{DoxyReturn}
\begin{DoxySeeAlso}{See also}
\doxyref{P\+H\+Y\+S\+F\+S\+\_\+read}{p.}{physfs_8h_a91234f576477f7de67d635761d01aa7b} 

\doxyref{P\+H\+Y\+S\+F\+S\+\_\+tell}{p.}{physfs_8h_a0d481bdd4cf32ed1a41540ee59840c24} 
\end{DoxySeeAlso}
\mbox{\label{physfs_8h_accd31941b636ff153d328aebf72048c7}} 
\index{physfs.\+h@{physfs.\+h}!P\+H\+Y\+S\+F\+S\+\_\+exists@{P\+H\+Y\+S\+F\+S\+\_\+exists}}
\index{P\+H\+Y\+S\+F\+S\+\_\+exists@{P\+H\+Y\+S\+F\+S\+\_\+exists}!physfs.\+h@{physfs.\+h}}
\subsubsection{P\+H\+Y\+S\+F\+S\+\_\+exists()}
{\footnotesize\ttfamily int P\+H\+Y\+S\+F\+S\+\_\+exists (\begin{DoxyParamCaption}\item[{const char $\ast$}]{fname }\end{DoxyParamCaption})}



Determine if a file exists in the search path. 

Reports true if there is an entry anywhere in the search path by the name of (fname).

Note that entries that are symlinks are ignored if P\+H\+Y\+S\+F\+S\+\_\+permit\+Symbolic\+Links(1) hasn\textquotesingle{}t been called, so you might end up further down in the search path than expected.


\begin{DoxyParams}{Parameters}
{\em fname} & filename in platform-\/independent notation. \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
non-\/zero if filename exists. zero otherwise. 
\end{DoxyReturn}
\mbox{\label{physfs_8h_a3f1d8b415d37d8040ca423ed29536fde}} 
\index{physfs.\+h@{physfs.\+h}!P\+H\+Y\+S\+F\+S\+\_\+file\+Length@{P\+H\+Y\+S\+F\+S\+\_\+file\+Length}}
\index{P\+H\+Y\+S\+F\+S\+\_\+file\+Length@{P\+H\+Y\+S\+F\+S\+\_\+file\+Length}!physfs.\+h@{physfs.\+h}}
\subsubsection{P\+H\+Y\+S\+F\+S\+\_\+file\+Length()}
{\footnotesize\ttfamily \textbf{ P\+H\+Y\+S\+F\+S\+\_\+sint64} P\+H\+Y\+S\+F\+S\+\_\+file\+Length (\begin{DoxyParamCaption}\item[{\textbf{ P\+H\+Y\+S\+F\+S\+\_\+\+File} $\ast$}]{handle }\end{DoxyParamCaption})}



Get total length of a file in bytes. 

Note that if another process/thread is writing to this file at the same time, then the information this function supplies could be incorrect before you get it. Use with caution, or better yet, don\textquotesingle{}t use at all.


\begin{DoxyParams}{Parameters}
{\em handle} & handle returned from P\+H\+Y\+S\+F\+S\+\_\+open$\ast$(). \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
size in bytes of the file. -\/1 if can\textquotesingle{}t be determined.
\end{DoxyReturn}
\begin{DoxySeeAlso}{See also}
\doxyref{P\+H\+Y\+S\+F\+S\+\_\+tell}{p.}{physfs_8h_a0d481bdd4cf32ed1a41540ee59840c24} 

\doxyref{P\+H\+Y\+S\+F\+S\+\_\+seek}{p.}{physfs_8h_ae562b45b1e1b02505ce1d82ad785f04a} 
\end{DoxySeeAlso}
\mbox{\label{physfs_8h_a3fd8f9cfdfd09f4fb778a386d8e97e8a}} 
\index{physfs.\+h@{physfs.\+h}!P\+H\+Y\+S\+F\+S\+\_\+flush@{P\+H\+Y\+S\+F\+S\+\_\+flush}}
\index{P\+H\+Y\+S\+F\+S\+\_\+flush@{P\+H\+Y\+S\+F\+S\+\_\+flush}!physfs.\+h@{physfs.\+h}}
\subsubsection{P\+H\+Y\+S\+F\+S\+\_\+flush()}
{\footnotesize\ttfamily int P\+H\+Y\+S\+F\+S\+\_\+flush (\begin{DoxyParamCaption}\item[{\textbf{ P\+H\+Y\+S\+F\+S\+\_\+\+File} $\ast$}]{handle }\end{DoxyParamCaption})}



Flush a buffered Physics\+FS file handle. 

For buffered files opened for writing, this will put the current contents of the buffer to disk and flag the buffer as empty if possible.

For buffered files opened for reading or unbuffered files, this is a safe no-\/op, and will report success.


\begin{DoxyParams}{Parameters}
{\em handle} & handle returned from P\+H\+Y\+S\+F\+S\+\_\+open$\ast$(). \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
nonzero if successful, zero on error.
\end{DoxyReturn}
\begin{DoxySeeAlso}{See also}
\doxyref{P\+H\+Y\+S\+F\+S\+\_\+set\+Buffer}{p.}{physfs_8h_aede5de47197e1a613d2091802befc886} 

\doxyref{P\+H\+Y\+S\+F\+S\+\_\+close}{p.}{physfs_8h_a6822f8ff10073e855a1c3a6485b882f2} 
\end{DoxySeeAlso}
\mbox{\label{physfs_8h_af6aeb2ffdcee44f02cf380da62462b05}} 
\index{physfs.\+h@{physfs.\+h}!P\+H\+Y\+S\+F\+S\+\_\+free\+List@{P\+H\+Y\+S\+F\+S\+\_\+free\+List}}
\index{P\+H\+Y\+S\+F\+S\+\_\+free\+List@{P\+H\+Y\+S\+F\+S\+\_\+free\+List}!physfs.\+h@{physfs.\+h}}
\subsubsection{P\+H\+Y\+S\+F\+S\+\_\+free\+List()}
{\footnotesize\ttfamily void P\+H\+Y\+S\+F\+S\+\_\+free\+List (\begin{DoxyParamCaption}\item[{void $\ast$}]{list\+Var }\end{DoxyParamCaption})}



Deallocate resources of lists returned by Physics\+FS. 

Certain Physics\+FS functions return lists of information that are dynamically allocated. Use this function to free those resources.

It is safe to pass a N\+U\+LL here, but doing so will cause a crash in versions before Physics\+FS 2.\+1.\+0.


\begin{DoxyParams}{Parameters}
{\em list\+Var} & List of information specified as freeable by this function. Passing N\+U\+LL is safe; it is a valid no-\/op.\\
\hline
\end{DoxyParams}
\begin{DoxySeeAlso}{See also}
\doxyref{P\+H\+Y\+S\+F\+S\+\_\+get\+Cd\+Rom\+Dirs}{p.}{physfs_8h_af9a9674a36f7c96ed7813f9db06eefed} 

\doxyref{P\+H\+Y\+S\+F\+S\+\_\+enumerate\+Files}{p.}{physfs_8h_a0f4ae950c2dae0735a91263ddd20fbf4} 

\doxyref{P\+H\+Y\+S\+F\+S\+\_\+get\+Search\+Path}{p.}{physfs_8h_ac738531e9c7e5ca3797b64985c103cf4} 
\end{DoxySeeAlso}
\mbox{\label{physfs_8h_aaa1ce4636c87fdb6e080b1376fd7b25e}} 
\index{physfs.\+h@{physfs.\+h}!P\+H\+Y\+S\+F\+S\+\_\+get\+Allocator@{P\+H\+Y\+S\+F\+S\+\_\+get\+Allocator}}
\index{P\+H\+Y\+S\+F\+S\+\_\+get\+Allocator@{P\+H\+Y\+S\+F\+S\+\_\+get\+Allocator}!physfs.\+h@{physfs.\+h}}
\subsubsection{P\+H\+Y\+S\+F\+S\+\_\+get\+Allocator()}
{\footnotesize\ttfamily const \textbf{ P\+H\+Y\+S\+F\+S\+\_\+\+Allocator} $\ast$ P\+H\+Y\+S\+F\+S\+\_\+get\+Allocator (\begin{DoxyParamCaption}\item[{void}]{ }\end{DoxyParamCaption})}



Discover the current allocator. 

(This is for limited, hardcore use. If you don\textquotesingle{}t immediately see a need for it, you can probably ignore this forever.)

This function exposes the function pointers that make up the currently used allocator. This can be useful for apps that want to access Physics\+FS\textquotesingle{}s internal, default allocation routines, as well as for external code that wants to share the same allocator, even if the application specified their own.

This call is only valid between \doxyref{P\+H\+Y\+S\+F\+S\+\_\+init()}{p.}{physfs_8h_a61b94cac8e65267afb8a5f2344e60dd1} and \doxyref{P\+H\+Y\+S\+F\+S\+\_\+deinit()}{p.}{physfs_8h_aa465c9b58e5020f503085d433a413b5b} calls; it will return N\+U\+LL if the library isn\textquotesingle{}t initialized. As we can\textquotesingle{}t guarantee the state of the internal allocators unless the library is initialized, you shouldn\textquotesingle{}t use any allocator returned here after a call to \doxyref{P\+H\+Y\+S\+F\+S\+\_\+deinit()}{p.}{physfs_8h_aa465c9b58e5020f503085d433a413b5b}.

Do not call the returned allocator\textquotesingle{}s Init() or Deinit() methods under any circumstances.

If you aren\textquotesingle{}t immediately sure what to do with this function, you can safely ignore it altogether.

\begin{DoxyReturn}{Returns}
Current allocator, as set by \doxyref{P\+H\+Y\+S\+F\+S\+\_\+set\+Allocator()}{p.}{physfs_8h_ae6297d1ae7755b9236b01950bfbb0ef1}, or Physics\+FS\textquotesingle{}s internal, default allocator if no application defined allocator is currently set. Will return N\+U\+LL if the library is not initialized.
\end{DoxyReturn}
\begin{DoxySeeAlso}{See also}
\doxyref{P\+H\+Y\+S\+F\+S\+\_\+\+Allocator}{p.}{structPHYSFS__Allocator} 

\doxyref{P\+H\+Y\+S\+F\+S\+\_\+set\+Allocator}{p.}{physfs_8h_ae6297d1ae7755b9236b01950bfbb0ef1} 
\end{DoxySeeAlso}
\mbox{\label{physfs_8h_a0034c327dfb381a1c95deb80878bcede}} 
\index{physfs.\+h@{physfs.\+h}!P\+H\+Y\+S\+F\+S\+\_\+get\+Base\+Dir@{P\+H\+Y\+S\+F\+S\+\_\+get\+Base\+Dir}}
\index{P\+H\+Y\+S\+F\+S\+\_\+get\+Base\+Dir@{P\+H\+Y\+S\+F\+S\+\_\+get\+Base\+Dir}!physfs.\+h@{physfs.\+h}}
\subsubsection{P\+H\+Y\+S\+F\+S\+\_\+get\+Base\+Dir()}
{\footnotesize\ttfamily const char $\ast$ P\+H\+Y\+S\+F\+S\+\_\+get\+Base\+Dir (\begin{DoxyParamCaption}\item[{void}]{ }\end{DoxyParamCaption})}



Get the path where the application resides. 

Helper function.

Get the \char`\"{}base dir\char`\"{}. This is the directory where the application was run from, which is probably the installation directory, and may or may not be the process\textquotesingle{}s current working directory.

You should probably use the base dir in your search path.

\begin{DoxyReturn}{Returns}
R\+E\+AD O\+N\+LY string of base dir in platform-\/dependent notation.
\end{DoxyReturn}
\begin{DoxySeeAlso}{See also}
\doxyref{P\+H\+Y\+S\+F\+S\+\_\+get\+Pref\+Dir}{p.}{physfs_8h_acd87392d234d070695303521bb8052a5} 
\end{DoxySeeAlso}
\mbox{\label{physfs_8h_af9a9674a36f7c96ed7813f9db06eefed}} 
\index{physfs.\+h@{physfs.\+h}!P\+H\+Y\+S\+F\+S\+\_\+get\+Cd\+Rom\+Dirs@{P\+H\+Y\+S\+F\+S\+\_\+get\+Cd\+Rom\+Dirs}}
\index{P\+H\+Y\+S\+F\+S\+\_\+get\+Cd\+Rom\+Dirs@{P\+H\+Y\+S\+F\+S\+\_\+get\+Cd\+Rom\+Dirs}!physfs.\+h@{physfs.\+h}}
\subsubsection{P\+H\+Y\+S\+F\+S\+\_\+get\+Cd\+Rom\+Dirs()}
{\footnotesize\ttfamily char $\ast$$\ast$ P\+H\+Y\+S\+F\+S\+\_\+get\+Cd\+Rom\+Dirs (\begin{DoxyParamCaption}\item[{void}]{ }\end{DoxyParamCaption})}



Get an array of paths to available C\+D-\/\+R\+OM drives. 

The dirs returned are platform-\/dependent (\char`\"{}\+D\+:\textbackslash{}\char`\"{} on Win32, \char`\"{}/cdrom\char`\"{} or whatnot on Unix). Dirs are only returned if there is a disc ready and accessible in the drive. So if you\textquotesingle{}ve got two drives (D\+: and E\+:), and only E\+: has a disc in it, then that\textquotesingle{}s all you get. If the user inserts a disc in D\+: and you call this function again, you get both drives. If, on a Unix box, the user unmounts a disc and remounts it elsewhere, the next call to this function will reflect that change.

This function refers to \char`\"{}\+C\+D-\/\+R\+O\+M\char`\"{} media, but it really means \char`\"{}inserted disc
 media,\char`\"{} such as D\+V\+D-\/\+R\+OM, H\+D-\/\+D\+VD, C\+D\+RW, and Blu-\/\+Ray discs. It looks for filesystems, and as such won\textquotesingle{}t report an audio CD, unless there\textquotesingle{}s a mounted filesystem track on it.

The returned value is an array of strings, with a N\+U\+LL entry to signify the end of the list\+:


\begin{DoxyCode}
\textcolor{keywordtype}{char} **cds = PHYSFS_getCdRomDirs();
\textcolor{keywordtype}{char} **i;

\textcolor{keywordflow}{for} (i = cds; *i != NULL; i++)
    printf(\textcolor{stringliteral}{"cdrom dir [%s] is available.\(\backslash\)n"}, *i);

PHYSFS_freeList(cds);
\end{DoxyCode}


This call may block while drives spin up. Be forewarned.

When you are done with the returned information, you may dispose of the resources by calling \doxyref{P\+H\+Y\+S\+F\+S\+\_\+free\+List()}{p.}{physfs_8h_af6aeb2ffdcee44f02cf380da62462b05} with the returned pointer.

\begin{DoxyReturn}{Returns}
Null-\/terminated array of null-\/terminated strings.
\end{DoxyReturn}
\begin{DoxySeeAlso}{See also}
\doxyref{P\+H\+Y\+S\+F\+S\+\_\+get\+Cd\+Rom\+Dirs\+Callback}{p.}{physfs_8h_ace04dfd0654ce55a81a85f57f56c7410} 
\end{DoxySeeAlso}
\mbox{\label{physfs_8h_ace04dfd0654ce55a81a85f57f56c7410}} 
\index{physfs.\+h@{physfs.\+h}!P\+H\+Y\+S\+F\+S\+\_\+get\+Cd\+Rom\+Dirs\+Callback@{P\+H\+Y\+S\+F\+S\+\_\+get\+Cd\+Rom\+Dirs\+Callback}}
\index{P\+H\+Y\+S\+F\+S\+\_\+get\+Cd\+Rom\+Dirs\+Callback@{P\+H\+Y\+S\+F\+S\+\_\+get\+Cd\+Rom\+Dirs\+Callback}!physfs.\+h@{physfs.\+h}}
\subsubsection{P\+H\+Y\+S\+F\+S\+\_\+get\+Cd\+Rom\+Dirs\+Callback()}
{\footnotesize\ttfamily void P\+H\+Y\+S\+F\+S\+\_\+get\+Cd\+Rom\+Dirs\+Callback (\begin{DoxyParamCaption}\item[{\textbf{ P\+H\+Y\+S\+F\+S\+\_\+\+String\+Callback}}]{c,  }\item[{void $\ast$}]{d }\end{DoxyParamCaption})}



Enumerate C\+D-\/\+R\+OM directories, using an application-\/defined callback. 

Internally, \doxyref{P\+H\+Y\+S\+F\+S\+\_\+get\+Cd\+Rom\+Dirs()}{p.}{physfs_8h_af9a9674a36f7c96ed7813f9db06eefed} just calls this function and then builds a list before returning to the application, so functionality is identical except for how the information is represented to the application.

Unlike \doxyref{P\+H\+Y\+S\+F\+S\+\_\+get\+Cd\+Rom\+Dirs()}{p.}{physfs_8h_af9a9674a36f7c96ed7813f9db06eefed}, this function does not return an array. Rather, it calls a function specified by the application once per detected disc\+:


\begin{DoxyCode}
\textcolor{keyword}{static} \textcolor{keywordtype}{void} foundDisc(\textcolor{keywordtype}{void} *data, \textcolor{keyword}{const} \textcolor{keywordtype}{char} *cddir)
\{
    printf(\textcolor{stringliteral}{"cdrom dir [%s] is available.\(\backslash\)n"}, cddir);
\}

\textcolor{comment}{// ...}
PHYSFS_getCdRomDirsCallback(foundDisc, NULL);
\end{DoxyCode}


This call may block while drives spin up. Be forewarned.


\begin{DoxyParams}{Parameters}
{\em c} & Callback function to notify about detected drives. \\
\hline
{\em d} & Application-\/defined data passed to callback. Can be N\+U\+LL.\\
\hline
\end{DoxyParams}
\begin{DoxySeeAlso}{See also}
\doxyref{P\+H\+Y\+S\+F\+S\+\_\+\+String\+Callback}{p.}{physfs_8h_a6331ac65f8e0d32288f8597e48188a4f} 

\doxyref{P\+H\+Y\+S\+F\+S\+\_\+get\+Cd\+Rom\+Dirs}{p.}{physfs_8h_af9a9674a36f7c96ed7813f9db06eefed} 
\end{DoxySeeAlso}
\mbox{\label{physfs_8h_ad1dc17d387c45e9155d1f0c348a7cbcc}} 
\index{physfs.\+h@{physfs.\+h}!P\+H\+Y\+S\+F\+S\+\_\+get\+Dir\+Separator@{P\+H\+Y\+S\+F\+S\+\_\+get\+Dir\+Separator}}
\index{P\+H\+Y\+S\+F\+S\+\_\+get\+Dir\+Separator@{P\+H\+Y\+S\+F\+S\+\_\+get\+Dir\+Separator}!physfs.\+h@{physfs.\+h}}
\subsubsection{P\+H\+Y\+S\+F\+S\+\_\+get\+Dir\+Separator()}
{\footnotesize\ttfamily const char $\ast$ P\+H\+Y\+S\+F\+S\+\_\+get\+Dir\+Separator (\begin{DoxyParamCaption}\item[{void}]{ }\end{DoxyParamCaption})}



Get platform-\/dependent dir separator string. 

This returns \char`\"{}\textbackslash{}\textbackslash{}\char`\"{} on win32, \char`\"{}/\char`\"{} on Unix, and \char`\"{}\+:\char`\"{} on Mac\+OS. It may be more than one character, depending on the platform, and your code should take that into account. Note that this is only useful for setting up the search/write paths, since access into those dirs always use \textquotesingle{}/\textquotesingle{} (platform-\/independent notation) to separate directories. This is also handy for getting platform-\/independent access when using stdio calls.

\begin{DoxyReturn}{Returns}
R\+E\+AD O\+N\+LY null-\/terminated string of platform\textquotesingle{}s dir separator. 
\end{DoxyReturn}
\mbox{\label{physfs_8h_a545f6b5ba97faa19441932dffb65c3be}} 
\index{physfs.\+h@{physfs.\+h}!P\+H\+Y\+S\+F\+S\+\_\+get\+Error\+By\+Code@{P\+H\+Y\+S\+F\+S\+\_\+get\+Error\+By\+Code}}
\index{P\+H\+Y\+S\+F\+S\+\_\+get\+Error\+By\+Code@{P\+H\+Y\+S\+F\+S\+\_\+get\+Error\+By\+Code}!physfs.\+h@{physfs.\+h}}
\subsubsection{P\+H\+Y\+S\+F\+S\+\_\+get\+Error\+By\+Code()}
{\footnotesize\ttfamily const char $\ast$ P\+H\+Y\+S\+F\+S\+\_\+get\+Error\+By\+Code (\begin{DoxyParamCaption}\item[{\textbf{ P\+H\+Y\+S\+F\+S\+\_\+\+Error\+Code}}]{code }\end{DoxyParamCaption})}



Get human-\/readable description string for a given error code. 

Get a static string, in U\+T\+F-\/8 format, that represents an English description of a given error code.

This string is guaranteed to never change (although we may add new strings for new error codes in later versions of Physics\+FS), so you can use it for keying a localization dictionary.

It is safe to call this function at anytime, even before \doxyref{P\+H\+Y\+S\+F\+S\+\_\+init()}{p.}{physfs_8h_a61b94cac8e65267afb8a5f2344e60dd1}.

These strings are meant to be passed on directly to the user. Generally, applications should only concern themselves with whether a given function failed, but not care about the specifics much.

Do not attempt to free the returned strings; they are read-\/only and you don\textquotesingle{}t own their memory pages.


\begin{DoxyParams}{Parameters}
{\em code} & Error code to convert to a string. \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
R\+E\+AD O\+N\+LY string of requested error message, N\+U\+LL if this is not a valid Physics\+FS error code. Always check for N\+U\+LL if you might be looking up an error code that didn\textquotesingle{}t exist in an earlier version of Physics\+FS.
\end{DoxyReturn}
\begin{DoxySeeAlso}{See also}
\doxyref{P\+H\+Y\+S\+F\+S\+\_\+get\+Last\+Error\+Code}{p.}{physfs_8h_ae916a873aae2cf6b6e09d733cd1b3f4b} 
\end{DoxySeeAlso}
\mbox{\label{physfs_8h_a9f78e4ab560885fd10202988d2fff1b6}} 
\index{physfs.\+h@{physfs.\+h}!P\+H\+Y\+S\+F\+S\+\_\+get\+Last\+Error@{P\+H\+Y\+S\+F\+S\+\_\+get\+Last\+Error}}
\index{P\+H\+Y\+S\+F\+S\+\_\+get\+Last\+Error@{P\+H\+Y\+S\+F\+S\+\_\+get\+Last\+Error}!physfs.\+h@{physfs.\+h}}
\subsubsection{P\+H\+Y\+S\+F\+S\+\_\+get\+Last\+Error()}
{\footnotesize\ttfamily const char $\ast$ P\+H\+Y\+S\+F\+S\+\_\+get\+Last\+Error (\begin{DoxyParamCaption}\item[{void}]{ }\end{DoxyParamCaption})}



Get human-\/readable error information. 

\begin{DoxyRefDesc}{Deprecated}
\item[\textbf{ Deprecated}]Use \doxyref{P\+H\+Y\+S\+F\+S\+\_\+get\+Last\+Error\+Code()}{p.}{physfs_8h_ae916a873aae2cf6b6e09d733cd1b3f4b} and \doxyref{P\+H\+Y\+S\+F\+S\+\_\+get\+Error\+By\+Code()}{p.}{physfs_8h_a545f6b5ba97faa19441932dffb65c3be} instead.\end{DoxyRefDesc}


\begin{DoxyWarning}{Warning}
As of Physics\+FS 2.\+1, this function has been nerfed. Before Physics\+FS 2.\+1, this function was the only way to get error details beyond a given function\textquotesingle{}s basic return value. This was meant to be a human-\/readable string in one of several languages, and was not useful for application parsing. This was a problem, because the developer and not the user chose the language at compile time, and the Physics\+FS maintainers had to (poorly) maintain a significant amount of localization work. The app couldn\textquotesingle{}t parse the strings, even if they counted on a specific language, since some were dynamically generated. In 2.\+1 and later, this always returns a static string in English; you may use it as a key string for your own localizations if you like, as we\textquotesingle{}ll promise not to change existing error strings. Also, if your application wants to look at specific errors, we now offer a better option\+: use \doxyref{P\+H\+Y\+S\+F\+S\+\_\+get\+Last\+Error\+Code()}{p.}{physfs_8h_ae916a873aae2cf6b6e09d733cd1b3f4b} instead.
\end{DoxyWarning}
Get the last Physics\+FS error message as a human-\/readable, null-\/terminated string. This will return N\+U\+LL if there\textquotesingle{}s been no error since the last call to this function. The pointer returned by this call points to an internal buffer. Each thread has a unique error state associated with it, but each time a new error message is set, it will overwrite the previous one associated with that thread. It is safe to call this function at anytime, even before \doxyref{P\+H\+Y\+S\+F\+S\+\_\+init()}{p.}{physfs_8h_a61b94cac8e65267afb8a5f2344e60dd1}.

\doxyref{P\+H\+Y\+S\+F\+S\+\_\+get\+Last\+Error()}{p.}{physfs_8h_a9f78e4ab560885fd10202988d2fff1b6} and \doxyref{P\+H\+Y\+S\+F\+S\+\_\+get\+Last\+Error\+Code()}{p.}{physfs_8h_ae916a873aae2cf6b6e09d733cd1b3f4b} both reset the same thread-\/specific error state. Calling one will wipe out the other\textquotesingle{}s data. If you need both, call \doxyref{P\+H\+Y\+S\+F\+S\+\_\+get\+Last\+Error\+Code()}{p.}{physfs_8h_ae916a873aae2cf6b6e09d733cd1b3f4b}, then pass that value to \doxyref{P\+H\+Y\+S\+F\+S\+\_\+get\+Error\+By\+Code()}{p.}{physfs_8h_a545f6b5ba97faa19441932dffb65c3be}.

As of Physics\+FS 2.\+1, this function only presents text in the English language, but the strings are static, so you can use them as keys into your own localization dictionary. These strings are meant to be passed on directly to the user.

Generally, applications should only concern themselves with whether a given function failed; however, if your code require more specifics, you should use \doxyref{P\+H\+Y\+S\+F\+S\+\_\+get\+Last\+Error\+Code()}{p.}{physfs_8h_ae916a873aae2cf6b6e09d733cd1b3f4b} instead of this function.

\begin{DoxyReturn}{Returns}
R\+E\+AD O\+N\+LY string of last error message.
\end{DoxyReturn}
\begin{DoxySeeAlso}{See also}
\doxyref{P\+H\+Y\+S\+F\+S\+\_\+get\+Last\+Error\+Code}{p.}{physfs_8h_ae916a873aae2cf6b6e09d733cd1b3f4b} 

\doxyref{P\+H\+Y\+S\+F\+S\+\_\+get\+Error\+By\+Code}{p.}{physfs_8h_a545f6b5ba97faa19441932dffb65c3be} 
\end{DoxySeeAlso}
\mbox{\label{physfs_8h_ae916a873aae2cf6b6e09d733cd1b3f4b}} 
\index{physfs.\+h@{physfs.\+h}!P\+H\+Y\+S\+F\+S\+\_\+get\+Last\+Error\+Code@{P\+H\+Y\+S\+F\+S\+\_\+get\+Last\+Error\+Code}}
\index{P\+H\+Y\+S\+F\+S\+\_\+get\+Last\+Error\+Code@{P\+H\+Y\+S\+F\+S\+\_\+get\+Last\+Error\+Code}!physfs.\+h@{physfs.\+h}}
\subsubsection{P\+H\+Y\+S\+F\+S\+\_\+get\+Last\+Error\+Code()}
{\footnotesize\ttfamily \textbf{ P\+H\+Y\+S\+F\+S\+\_\+\+Error\+Code} P\+H\+Y\+S\+F\+S\+\_\+get\+Last\+Error\+Code (\begin{DoxyParamCaption}\item[{void}]{ }\end{DoxyParamCaption})}



Get machine-\/readable error information. 

Get the last Physics\+FS error message as an integer value. This will return P\+H\+Y\+S\+F\+S\+\_\+\+E\+R\+R\+\_\+\+OK if there\textquotesingle{}s been no error since the last call to this function. Each thread has a unique error state associated with it, but each time a new error message is set, it will overwrite the previous one associated with that thread. It is safe to call this function at anytime, even before \doxyref{P\+H\+Y\+S\+F\+S\+\_\+init()}{p.}{physfs_8h_a61b94cac8e65267afb8a5f2344e60dd1}.

\doxyref{P\+H\+Y\+S\+F\+S\+\_\+get\+Last\+Error()}{p.}{physfs_8h_a9f78e4ab560885fd10202988d2fff1b6} and \doxyref{P\+H\+Y\+S\+F\+S\+\_\+get\+Last\+Error\+Code()}{p.}{physfs_8h_ae916a873aae2cf6b6e09d733cd1b3f4b} both reset the same thread-\/specific error state. Calling one will wipe out the other\textquotesingle{}s data. If you need both, call \doxyref{P\+H\+Y\+S\+F\+S\+\_\+get\+Last\+Error\+Code()}{p.}{physfs_8h_ae916a873aae2cf6b6e09d733cd1b3f4b}, then pass that value to \doxyref{P\+H\+Y\+S\+F\+S\+\_\+get\+Error\+By\+Code()}{p.}{physfs_8h_a545f6b5ba97faa19441932dffb65c3be}.

Generally, applications should only concern themselves with whether a given function failed; however, if you require more specifics, you can try this function to glean information, if there\textquotesingle{}s some specific problem you\textquotesingle{}re expecting and plan to handle. But with most things that involve file systems, the best course of action is usually to give up, report the problem to the user, and let them figure out what should be done about it. For that, you might prefer \doxyref{P\+H\+Y\+S\+F\+S\+\_\+get\+Error\+By\+Code()}{p.}{physfs_8h_a545f6b5ba97faa19441932dffb65c3be} instead.

\begin{DoxyReturn}{Returns}
Enumeration value that represents last reported error.
\end{DoxyReturn}
\begin{DoxySeeAlso}{See also}
\doxyref{P\+H\+Y\+S\+F\+S\+\_\+get\+Error\+By\+Code}{p.}{physfs_8h_a545f6b5ba97faa19441932dffb65c3be} 
\end{DoxySeeAlso}
\mbox{\label{physfs_8h_a58e182a3deb67dd780f1de23440fa3e5}} 
\index{physfs.\+h@{physfs.\+h}!P\+H\+Y\+S\+F\+S\+\_\+get\+Last\+Mod\+Time@{P\+H\+Y\+S\+F\+S\+\_\+get\+Last\+Mod\+Time}}
\index{P\+H\+Y\+S\+F\+S\+\_\+get\+Last\+Mod\+Time@{P\+H\+Y\+S\+F\+S\+\_\+get\+Last\+Mod\+Time}!physfs.\+h@{physfs.\+h}}
\subsubsection{P\+H\+Y\+S\+F\+S\+\_\+get\+Last\+Mod\+Time()}
{\footnotesize\ttfamily \textbf{ P\+H\+Y\+S\+F\+S\+\_\+sint64} P\+H\+Y\+S\+F\+S\+\_\+get\+Last\+Mod\+Time (\begin{DoxyParamCaption}\item[{const char $\ast$}]{filename }\end{DoxyParamCaption})}



Get the last modification time of a file. 

\begin{DoxyRefDesc}{Deprecated}
\item[\textbf{ Deprecated}]As of Physics\+FS 2.\+1, use \doxyref{P\+H\+Y\+S\+F\+S\+\_\+stat()}{p.}{physfs_8h_a7f5e23675c50ffe51ad00cceb5a65348} instead. This function just wraps it anyhow.\end{DoxyRefDesc}


The modtime is returned as a number of seconds since the Unix epoch (midnight, Jan 1, 1970). The exact derivation and accuracy of this time depends on the particular archiver. If there is no reasonable way to obtain this information for a particular archiver, or there was some sort of error, this function returns (-\/1).

You must use this and not \doxyref{P\+H\+Y\+S\+F\+S\+\_\+stat()}{p.}{physfs_8h_a7f5e23675c50ffe51ad00cceb5a65348} if binary compatibility with Physics\+FS 2.\+0 is important (which it may not be for many people).


\begin{DoxyParams}{Parameters}
{\em filename} & filename to check, in platform-\/independent notation. \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
last modified time of the file. -\/1 if it can\textquotesingle{}t be determined.
\end{DoxyReturn}
\begin{DoxySeeAlso}{See also}
\doxyref{P\+H\+Y\+S\+F\+S\+\_\+stat}{p.}{physfs_8h_a7f5e23675c50ffe51ad00cceb5a65348} 
\end{DoxySeeAlso}
\mbox{\label{physfs_8h_a8977d0ba0a2301256e823532479f1a05}} 
\index{physfs.\+h@{physfs.\+h}!P\+H\+Y\+S\+F\+S\+\_\+get\+Linked\+Version@{P\+H\+Y\+S\+F\+S\+\_\+get\+Linked\+Version}}
\index{P\+H\+Y\+S\+F\+S\+\_\+get\+Linked\+Version@{P\+H\+Y\+S\+F\+S\+\_\+get\+Linked\+Version}!physfs.\+h@{physfs.\+h}}
\subsubsection{P\+H\+Y\+S\+F\+S\+\_\+get\+Linked\+Version()}
{\footnotesize\ttfamily void P\+H\+Y\+S\+F\+S\+\_\+get\+Linked\+Version (\begin{DoxyParamCaption}\item[{\textbf{ P\+H\+Y\+S\+F\+S\+\_\+\+Version} $\ast$}]{ver }\end{DoxyParamCaption})}



Get the version of Physics\+FS that is linked against your program. 

If you are using a shared library (D\+LL) version of Phys\+FS, then it is possible that it will be different than the version you compiled against.

This is a real function; the macro P\+H\+Y\+S\+F\+S\+\_\+\+V\+E\+R\+S\+I\+ON tells you what version of Phys\+FS you compiled against\+:


\begin{DoxyCode}
PHYSFS_Version compiled;
PHYSFS_Version linked;

PHYSFS_VERSION(&compiled);
PHYSFS_getLinkedVersion(&linked);
printf(\textcolor{stringliteral}{"We compiled against PhysFS version %d.%d.%d ...\(\backslash\)n"},
          compiled.major, compiled.minor, compiled.patch);
printf(\textcolor{stringliteral}{"But we linked against PhysFS version %d.%d.%d.\(\backslash\)n"},
          linked.major, linked.minor, linked.patch);
\end{DoxyCode}


This function may be called safely at any time, even before \doxyref{P\+H\+Y\+S\+F\+S\+\_\+init()}{p.}{physfs_8h_a61b94cac8e65267afb8a5f2344e60dd1}.

\begin{DoxySeeAlso}{See also}
\doxyref{P\+H\+Y\+S\+F\+S\+\_\+\+V\+E\+R\+S\+I\+ON}{p.}{physfs_8h_acb77c1f8f70028add43b9f81eef1ed78} 
\end{DoxySeeAlso}
\mbox{\label{physfs_8h_a365aee0c326b0e6bfbba5c039f7c4b5b}} 
\index{physfs.\+h@{physfs.\+h}!P\+H\+Y\+S\+F\+S\+\_\+get\+Mount\+Point@{P\+H\+Y\+S\+F\+S\+\_\+get\+Mount\+Point}}
\index{P\+H\+Y\+S\+F\+S\+\_\+get\+Mount\+Point@{P\+H\+Y\+S\+F\+S\+\_\+get\+Mount\+Point}!physfs.\+h@{physfs.\+h}}
\subsubsection{P\+H\+Y\+S\+F\+S\+\_\+get\+Mount\+Point()}
{\footnotesize\ttfamily int P\+H\+Y\+S\+F\+S\+\_\+get\+Mount\+Point (\begin{DoxyParamCaption}\item[{const char $\ast$}]{dir }\end{DoxyParamCaption})}



Determine a mounted archive\textquotesingle{}s mountpoint. 

You give this function the name of an archive or dir you successfully added to the search path, and it reports the location in the interpolated tree where it is mounted. Files mounted with a N\+U\+LL mountpoint or through \doxyref{P\+H\+Y\+S\+F\+S\+\_\+add\+To\+Search\+Path()}{p.}{physfs_8h_a0956d926822291a23ee540c2ffefa1af} will report \char`\"{}/\char`\"{}. The return value is R\+E\+AD O\+N\+LY and valid until the archive is removed from the search path.


\begin{DoxyParams}{Parameters}
{\em dir} & directory or archive previously added to the path, in platform-\/dependent notation. This must match the string used when adding, even if your string would also reference the same file with a different string of characters. \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
R\+E\+A\+D-\/\+O\+N\+LY string of mount point if added to path, N\+U\+LL on failure (bogus archive, etc). Use \doxyref{P\+H\+Y\+S\+F\+S\+\_\+get\+Last\+Error\+Code()}{p.}{physfs_8h_ae916a873aae2cf6b6e09d733cd1b3f4b} to obtain the specific error.
\end{DoxyReturn}
\begin{DoxySeeAlso}{See also}
\doxyref{P\+H\+Y\+S\+F\+S\+\_\+remove\+From\+Search\+Path}{p.}{physfs_8h_a1e4ed59d6c80b8fb28904723cfd5b510} 

\doxyref{P\+H\+Y\+S\+F\+S\+\_\+get\+Search\+Path}{p.}{physfs_8h_ac738531e9c7e5ca3797b64985c103cf4} 

\doxyref{P\+H\+Y\+S\+F\+S\+\_\+get\+Mount\+Point}{p.}{physfs_8h_a365aee0c326b0e6bfbba5c039f7c4b5b} 
\end{DoxySeeAlso}
\mbox{\label{physfs_8h_acd87392d234d070695303521bb8052a5}} 
\index{physfs.\+h@{physfs.\+h}!P\+H\+Y\+S\+F\+S\+\_\+get\+Pref\+Dir@{P\+H\+Y\+S\+F\+S\+\_\+get\+Pref\+Dir}}
\index{P\+H\+Y\+S\+F\+S\+\_\+get\+Pref\+Dir@{P\+H\+Y\+S\+F\+S\+\_\+get\+Pref\+Dir}!physfs.\+h@{physfs.\+h}}
\subsubsection{P\+H\+Y\+S\+F\+S\+\_\+get\+Pref\+Dir()}
{\footnotesize\ttfamily const char $\ast$ P\+H\+Y\+S\+F\+S\+\_\+get\+Pref\+Dir (\begin{DoxyParamCaption}\item[{const char $\ast$}]{org,  }\item[{const char $\ast$}]{app }\end{DoxyParamCaption})}



Get the user-\/and-\/app-\/specific path where files can be written. 

Helper function.

Get the \char`\"{}pref dir\char`\"{}. This is meant to be where users can write personal files (preferences and save games, etc) that are specific to your application. This directory is unique per user, per application.

This function will decide the appropriate location in the native filesystem, create the directory if necessary, and return a string in platform-\/dependent notation, suitable for passing to \doxyref{P\+H\+Y\+S\+F\+S\+\_\+set\+Write\+Dir()}{p.}{physfs_8h_a36c408d40b3a93c8f9fc02a16c02e430}.

On Windows, this might look like\+: \char`\"{}\+C\+:\textbackslash{}\textbackslash{}\+Users\textbackslash{}\textbackslash{}bob\textbackslash{}\textbackslash{}\+App\+Data\textbackslash{}\textbackslash{}\+Roaming\textbackslash{}\textbackslash{}\+My Company\textbackslash{}\textbackslash{}\+My Program Name\char`\"{}

On Linux, this might look like\+: \char`\"{}/home/bob/.\+local/share/\+My Program Name\char`\"{}

On Mac OS X, this might look like\+: \char`\"{}/\+Users/bob/\+Library/\+Application Support/\+My Program Name\char`\"{}

(etc.)

You should probably use the pref dir for your write dir, and also put it near the beginning of your search path. Older versions of Physics\+FS offered only \doxyref{P\+H\+Y\+S\+F\+S\+\_\+get\+User\+Dir()}{p.}{physfs_8h_a9d86fca7a5cbbc53f5425ff7539b1426} and left you to figure out where the files should go under that tree. This finds the correct location for whatever platform, which not only changes between operating systems, but also versions of the same operating system.

You specify the name of your organization (if it\textquotesingle{}s not a real organization, your name or an Internet domain you own might do) and the name of your application. These should be proper names.

Both the (org) and (app) strings may become part of a directory name, so please follow these rules\+:


\begin{DoxyItemize}
\item Try to use the same org string (including case-\/sensitivity) for all your applications that use this function.
\item Always use a unique app string for each one, and make sure it never changes for an app once you\textquotesingle{}ve decided on it.
\item Unicode characters are legal, as long as it\textquotesingle{}s U\+T\+F-\/8 encoded, but...
\item ...only use letters, numbers, and spaces. Avoid punctuation like \char`\"{}\+Game Name 2\+: Bad Guy\textquotesingle{}s Revenge!\char`\"{} ... \char`\"{}\+Game Name 2\char`\"{} is sufficient.
\end{DoxyItemize}

The pointer returned by this function remains valid until you call this function again, or call \doxyref{P\+H\+Y\+S\+F\+S\+\_\+deinit()}{p.}{physfs_8h_aa465c9b58e5020f503085d433a413b5b}. This is not necessarily a fast call, though, so you should call this once at startup and copy the string if you need it.

You should assume the path returned by this function is the only safe place to write files (and that \doxyref{P\+H\+Y\+S\+F\+S\+\_\+get\+User\+Dir()}{p.}{physfs_8h_a9d86fca7a5cbbc53f5425ff7539b1426} and \doxyref{P\+H\+Y\+S\+F\+S\+\_\+get\+Base\+Dir()}{p.}{physfs_8h_a0034c327dfb381a1c95deb80878bcede}, while they might be writable, or even parents of the returned path, aren\textquotesingle{}t where you should be writing things).


\begin{DoxyParams}{Parameters}
{\em org} & The name of your organization. \\
\hline
{\em app} & The name of your application. \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
R\+E\+AD O\+N\+LY string of user dir in platform-\/dependent notation. N\+U\+LL if there\textquotesingle{}s a problem (creating directory failed, etc).
\end{DoxyReturn}
\begin{DoxySeeAlso}{See also}
\doxyref{P\+H\+Y\+S\+F\+S\+\_\+get\+Base\+Dir}{p.}{physfs_8h_a0034c327dfb381a1c95deb80878bcede} 

\doxyref{P\+H\+Y\+S\+F\+S\+\_\+get\+User\+Dir}{p.}{physfs_8h_a9d86fca7a5cbbc53f5425ff7539b1426} 
\end{DoxySeeAlso}
\mbox{\label{physfs_8h_a539bcf0ebde6271e3e4a90dd287ca975}} 
\index{physfs.\+h@{physfs.\+h}!P\+H\+Y\+S\+F\+S\+\_\+get\+Real\+Dir@{P\+H\+Y\+S\+F\+S\+\_\+get\+Real\+Dir}}
\index{P\+H\+Y\+S\+F\+S\+\_\+get\+Real\+Dir@{P\+H\+Y\+S\+F\+S\+\_\+get\+Real\+Dir}!physfs.\+h@{physfs.\+h}}
\subsubsection{P\+H\+Y\+S\+F\+S\+\_\+get\+Real\+Dir()}
{\footnotesize\ttfamily const char $\ast$ P\+H\+Y\+S\+F\+S\+\_\+get\+Real\+Dir (\begin{DoxyParamCaption}\item[{const char $\ast$}]{filename }\end{DoxyParamCaption})}



Figure out where in the search path a file resides. 

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 \char`\"{}maps/level1.\+map\char`\"{}, and C\+:\textbackslash{}mygame is in your search path and C\+:\textbackslash{}mygame\textbackslash{}maps\textbackslash{}level1.\+map exists, then \char`\"{}\+C\+:\textbackslash{}mygame\char`\"{} is returned.

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

If you specify a fake directory that only exists as a mount point, it\textquotesingle{}ll be associated with the first archive mounted there, even though that directory isn\textquotesingle{}t necessarily contained in a real archive.

\begin{DoxyWarning}{Warning}
This will return N\+U\+LL if there is no real directory associated with (filename). Specifically, \doxyref{P\+H\+Y\+S\+F\+S\+\_\+mount\+Io()}{p.}{physfs_8h_a7ac107cf895f50f0d2219cdf44b8b758}, \doxyref{P\+H\+Y\+S\+F\+S\+\_\+mount\+Memory()}{p.}{physfs_8h_a0a977d04da585859e132ba4700df5d3a}, and \doxyref{P\+H\+Y\+S\+F\+S\+\_\+mount\+Handle()}{p.}{physfs_8h_a05407734c567ced1cffce64c6b1f0e93} will return N\+U\+LL even if the filename is found in the search path. Plan accordingly.
\end{DoxyWarning}

\begin{DoxyParams}{Parameters}
{\em filename} & file to look for. \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
R\+E\+AD O\+N\+LY string of element of search path containing the the file in question. N\+U\+LL if not found. 
\end{DoxyReturn}
\mbox{\label{physfs_8h_ac738531e9c7e5ca3797b64985c103cf4}} 
\index{physfs.\+h@{physfs.\+h}!P\+H\+Y\+S\+F\+S\+\_\+get\+Search\+Path@{P\+H\+Y\+S\+F\+S\+\_\+get\+Search\+Path}}
\index{P\+H\+Y\+S\+F\+S\+\_\+get\+Search\+Path@{P\+H\+Y\+S\+F\+S\+\_\+get\+Search\+Path}!physfs.\+h@{physfs.\+h}}
\subsubsection{P\+H\+Y\+S\+F\+S\+\_\+get\+Search\+Path()}
{\footnotesize\ttfamily char $\ast$$\ast$ P\+H\+Y\+S\+F\+S\+\_\+get\+Search\+Path (\begin{DoxyParamCaption}\item[{void}]{ }\end{DoxyParamCaption})}



Get the current search path. 

The default search path is an empty list.

The returned value is an array of strings, with a N\+U\+LL entry to signify the end of the list\+:


\begin{DoxyCode}
\textcolor{keywordtype}{char} **i;

\textcolor{keywordflow}{for} (i = PHYSFS_getSearchPath(); *i != NULL; i++)
    printf(\textcolor{stringliteral}{"[%s] is in the search path.\(\backslash\)n"}, *i);
\end{DoxyCode}


When you are done with the returned information, you may dispose of the resources by calling \doxyref{P\+H\+Y\+S\+F\+S\+\_\+free\+List()}{p.}{physfs_8h_af6aeb2ffdcee44f02cf380da62462b05} with the returned pointer.

\begin{DoxyReturn}{Returns}
Null-\/terminated array of null-\/terminated strings. N\+U\+LL if there was a problem (read\+: O\+UT OF M\+E\+M\+O\+RY).
\end{DoxyReturn}
\begin{DoxySeeAlso}{See also}
\doxyref{P\+H\+Y\+S\+F\+S\+\_\+get\+Search\+Path\+Callback}{p.}{physfs_8h_abd5f7188ab27722b0651e7503c6a737a} 

\doxyref{P\+H\+Y\+S\+F\+S\+\_\+add\+To\+Search\+Path}{p.}{physfs_8h_a0956d926822291a23ee540c2ffefa1af} 

\doxyref{P\+H\+Y\+S\+F\+S\+\_\+remove\+From\+Search\+Path}{p.}{physfs_8h_a1e4ed59d6c80b8fb28904723cfd5b510} 
\end{DoxySeeAlso}
\mbox{\label{physfs_8h_abd5f7188ab27722b0651e7503c6a737a}} 
\index{physfs.\+h@{physfs.\+h}!P\+H\+Y\+S\+F\+S\+\_\+get\+Search\+Path\+Callback@{P\+H\+Y\+S\+F\+S\+\_\+get\+Search\+Path\+Callback}}
\index{P\+H\+Y\+S\+F\+S\+\_\+get\+Search\+Path\+Callback@{P\+H\+Y\+S\+F\+S\+\_\+get\+Search\+Path\+Callback}!physfs.\+h@{physfs.\+h}}
\subsubsection{P\+H\+Y\+S\+F\+S\+\_\+get\+Search\+Path\+Callback()}
{\footnotesize\ttfamily void P\+H\+Y\+S\+F\+S\+\_\+get\+Search\+Path\+Callback (\begin{DoxyParamCaption}\item[{\textbf{ P\+H\+Y\+S\+F\+S\+\_\+\+String\+Callback}}]{c,  }\item[{void $\ast$}]{d }\end{DoxyParamCaption})}



Enumerate the search path, using an application-\/defined callback. 

Internally, \doxyref{P\+H\+Y\+S\+F\+S\+\_\+get\+Search\+Path()}{p.}{physfs_8h_ac738531e9c7e5ca3797b64985c103cf4} just calls this function and then builds a list before returning to the application, so functionality is identical except for how the information is represented to the application.

Unlike \doxyref{P\+H\+Y\+S\+F\+S\+\_\+get\+Search\+Path()}{p.}{physfs_8h_ac738531e9c7e5ca3797b64985c103cf4}, this function does not return an array. Rather, it calls a function specified by the application once per element of the search path\+:


\begin{DoxyCode}
\textcolor{keyword}{static} \textcolor{keywordtype}{void} printSearchPath(\textcolor{keywordtype}{void} *data, \textcolor{keyword}{const} \textcolor{keywordtype}{char} *pathItem)
\{
    printf(\textcolor{stringliteral}{"[%s] is in the search path.\(\backslash\)n"}, pathItem);
\}

\textcolor{comment}{// ...}
PHYSFS_getSearchPathCallback(printSearchPath, NULL);
\end{DoxyCode}


Elements of the search path are reported in order search priority, so the first archive/dir that would be examined when looking for a file is the first element passed through the callback.


\begin{DoxyParams}{Parameters}
{\em c} & Callback function to notify about search path elements. \\
\hline
{\em d} & Application-\/defined data passed to callback. Can be N\+U\+LL.\\
\hline
\end{DoxyParams}
\begin{DoxySeeAlso}{See also}
\doxyref{P\+H\+Y\+S\+F\+S\+\_\+\+String\+Callback}{p.}{physfs_8h_a6331ac65f8e0d32288f8597e48188a4f} 

\doxyref{P\+H\+Y\+S\+F\+S\+\_\+get\+Search\+Path}{p.}{physfs_8h_ac738531e9c7e5ca3797b64985c103cf4} 
\end{DoxySeeAlso}
\mbox{\label{physfs_8h_a9d86fca7a5cbbc53f5425ff7539b1426}} 
\index{physfs.\+h@{physfs.\+h}!P\+H\+Y\+S\+F\+S\+\_\+get\+User\+Dir@{P\+H\+Y\+S\+F\+S\+\_\+get\+User\+Dir}}
\index{P\+H\+Y\+S\+F\+S\+\_\+get\+User\+Dir@{P\+H\+Y\+S\+F\+S\+\_\+get\+User\+Dir}!physfs.\+h@{physfs.\+h}}
\subsubsection{P\+H\+Y\+S\+F\+S\+\_\+get\+User\+Dir()}
{\footnotesize\ttfamily const char $\ast$ P\+H\+Y\+S\+F\+S\+\_\+get\+User\+Dir (\begin{DoxyParamCaption}\item[{void}]{ }\end{DoxyParamCaption})}



Get the path where user\textquotesingle{}s home directory resides. 

\begin{DoxyRefDesc}{Deprecated}
\item[\textbf{ Deprecated}]As of Physics\+FS 2.\+1, you probably want \doxyref{P\+H\+Y\+S\+F\+S\+\_\+get\+Pref\+Dir()}{p.}{physfs_8h_acd87392d234d070695303521bb8052a5}.\end{DoxyRefDesc}


Helper function.

Get the \char`\"{}user dir\char`\"{}. This is meant to be a suggestion of where a specific user of the system can store files. On Unix, this is her home directory. On systems with no concept of multiple home directories (Mac\+OS, win95), this will default to something like \char`\"{}\+C\+:\textbackslash{}mybasedir\textbackslash{}users\textbackslash{}username\char`\"{} where \char`\"{}username\char`\"{} will either be the login name, or \char`\"{}default\char`\"{} if the platform doesn\textquotesingle{}t support multiple users, either.

\begin{DoxyReturn}{Returns}
R\+E\+AD O\+N\+LY string of user dir in platform-\/dependent notation.
\end{DoxyReturn}
\begin{DoxySeeAlso}{See also}
\doxyref{P\+H\+Y\+S\+F\+S\+\_\+get\+Base\+Dir}{p.}{physfs_8h_a0034c327dfb381a1c95deb80878bcede} 

\doxyref{P\+H\+Y\+S\+F\+S\+\_\+get\+Pref\+Dir}{p.}{physfs_8h_acd87392d234d070695303521bb8052a5} 
\end{DoxySeeAlso}
\mbox{\label{physfs_8h_a6533ff91180a4c8abfe24d458f6b9915}} 
\index{physfs.\+h@{physfs.\+h}!P\+H\+Y\+S\+F\+S\+\_\+get\+Write\+Dir@{P\+H\+Y\+S\+F\+S\+\_\+get\+Write\+Dir}}
\index{P\+H\+Y\+S\+F\+S\+\_\+get\+Write\+Dir@{P\+H\+Y\+S\+F\+S\+\_\+get\+Write\+Dir}!physfs.\+h@{physfs.\+h}}
\subsubsection{P\+H\+Y\+S\+F\+S\+\_\+get\+Write\+Dir()}
{\footnotesize\ttfamily const char $\ast$ P\+H\+Y\+S\+F\+S\+\_\+get\+Write\+Dir (\begin{DoxyParamCaption}\item[{void}]{ }\end{DoxyParamCaption})}



Get path where Physics\+FS will allow file writing. 

Get the current write dir. The default write dir is N\+U\+LL.

\begin{DoxyReturn}{Returns}
R\+E\+AD O\+N\+LY string of write dir in platform-\/dependent notation, OR N\+U\+LL IF NO W\+R\+I\+TE P\+A\+TH IS C\+U\+R\+R\+E\+N\+T\+LY S\+ET.
\end{DoxyReturn}
\begin{DoxySeeAlso}{See also}
\doxyref{P\+H\+Y\+S\+F\+S\+\_\+set\+Write\+Dir}{p.}{physfs_8h_a36c408d40b3a93c8f9fc02a16c02e430} 
\end{DoxySeeAlso}
\mbox{\label{physfs_8h_a61b94cac8e65267afb8a5f2344e60dd1}} 
\index{physfs.\+h@{physfs.\+h}!P\+H\+Y\+S\+F\+S\+\_\+init@{P\+H\+Y\+S\+F\+S\+\_\+init}}
\index{P\+H\+Y\+S\+F\+S\+\_\+init@{P\+H\+Y\+S\+F\+S\+\_\+init}!physfs.\+h@{physfs.\+h}}
\subsubsection{P\+H\+Y\+S\+F\+S\+\_\+init()}
{\footnotesize\ttfamily int P\+H\+Y\+S\+F\+S\+\_\+init (\begin{DoxyParamCaption}\item[{const char $\ast$}]{argv0 }\end{DoxyParamCaption})}



Initialize the Physics\+FS library. 

This must be called before any other Physics\+FS function.

This should be called prior to any attempts to change your process\textquotesingle{}s current working directory.


\begin{DoxyParams}{Parameters}
{\em argv0} & the argv[0] string passed to your program\textquotesingle{}s mainline. This may be N\+U\+LL on most platforms (such as ones without a standard main() function), but you should always try to pass something in here. Unix-\/like systems such as Linux {\itshape need} to pass argv[0] from main() in here. \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
nonzero on success, zero on error. Specifics of the error can be gleaned from \doxyref{P\+H\+Y\+S\+F\+S\+\_\+get\+Last\+Error()}{p.}{physfs_8h_a9f78e4ab560885fd10202988d2fff1b6}.
\end{DoxyReturn}
\begin{DoxySeeAlso}{See also}
\doxyref{P\+H\+Y\+S\+F\+S\+\_\+deinit}{p.}{physfs_8h_aa465c9b58e5020f503085d433a413b5b} 

\doxyref{P\+H\+Y\+S\+F\+S\+\_\+is\+Init}{p.}{physfs_8h_a6154be7bfa5d924476356a9fbd0d8223} 
\end{DoxySeeAlso}
\mbox{\label{physfs_8h_a5877fcafb72dca892c1c2465292eef47}} 
\index{physfs.\+h@{physfs.\+h}!P\+H\+Y\+S\+F\+S\+\_\+is\+Directory@{P\+H\+Y\+S\+F\+S\+\_\+is\+Directory}}
\index{P\+H\+Y\+S\+F\+S\+\_\+is\+Directory@{P\+H\+Y\+S\+F\+S\+\_\+is\+Directory}!physfs.\+h@{physfs.\+h}}
\subsubsection{P\+H\+Y\+S\+F\+S\+\_\+is\+Directory()}
{\footnotesize\ttfamily int P\+H\+Y\+S\+F\+S\+\_\+is\+Directory (\begin{DoxyParamCaption}\item[{const char $\ast$}]{fname }\end{DoxyParamCaption})}



Determine if a file in the search path is really a directory. 

\begin{DoxyRefDesc}{Deprecated}
\item[\textbf{ Deprecated}]As of Physics\+FS 2.\+1, use \doxyref{P\+H\+Y\+S\+F\+S\+\_\+stat()}{p.}{physfs_8h_a7f5e23675c50ffe51ad00cceb5a65348} instead. This function just wraps it anyhow.\end{DoxyRefDesc}


Determine if the first occurence of (fname) in the search path is really a directory entry.

Note that entries that are symlinks are ignored if P\+H\+Y\+S\+F\+S\+\_\+permit\+Symbolic\+Links(1) hasn\textquotesingle{}t been called, so you might end up further down in the search path than expected.


\begin{DoxyParams}{Parameters}
{\em fname} & filename in platform-\/independent notation. \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
non-\/zero if filename exists and is a directory. zero otherwise.
\end{DoxyReturn}
\begin{DoxySeeAlso}{See also}
\doxyref{P\+H\+Y\+S\+F\+S\+\_\+stat}{p.}{physfs_8h_a7f5e23675c50ffe51ad00cceb5a65348} 

\doxyref{P\+H\+Y\+S\+F\+S\+\_\+exists}{p.}{physfs_8h_accd31941b636ff153d328aebf72048c7} 
\end{DoxySeeAlso}
\mbox{\label{physfs_8h_a6154be7bfa5d924476356a9fbd0d8223}} 
\index{physfs.\+h@{physfs.\+h}!P\+H\+Y\+S\+F\+S\+\_\+is\+Init@{P\+H\+Y\+S\+F\+S\+\_\+is\+Init}}
\index{P\+H\+Y\+S\+F\+S\+\_\+is\+Init@{P\+H\+Y\+S\+F\+S\+\_\+is\+Init}!physfs.\+h@{physfs.\+h}}
\subsubsection{P\+H\+Y\+S\+F\+S\+\_\+is\+Init()}
{\footnotesize\ttfamily int P\+H\+Y\+S\+F\+S\+\_\+is\+Init (\begin{DoxyParamCaption}\item[{void}]{ }\end{DoxyParamCaption})}



Determine if the Physics\+FS library is initialized. 

Once \doxyref{P\+H\+Y\+S\+F\+S\+\_\+init()}{p.}{physfs_8h_a61b94cac8e65267afb8a5f2344e60dd1} returns successfully, this will return non-\/zero. Before a successful \doxyref{P\+H\+Y\+S\+F\+S\+\_\+init()}{p.}{physfs_8h_a61b94cac8e65267afb8a5f2344e60dd1} and after \doxyref{P\+H\+Y\+S\+F\+S\+\_\+deinit()}{p.}{physfs_8h_aa465c9b58e5020f503085d433a413b5b} returns successfully, this will return zero. This function is safe to call at any time.

\begin{DoxyReturn}{Returns}
non-\/zero if library is initialized, zero if library is not.
\end{DoxyReturn}
\begin{DoxySeeAlso}{See also}
\doxyref{P\+H\+Y\+S\+F\+S\+\_\+init}{p.}{physfs_8h_a61b94cac8e65267afb8a5f2344e60dd1} 

\doxyref{P\+H\+Y\+S\+F\+S\+\_\+deinit}{p.}{physfs_8h_aa465c9b58e5020f503085d433a413b5b} 
\end{DoxySeeAlso}
\mbox{\label{physfs_8h_ae44880fa7528d0b4edb00034324a0884}} 
\index{physfs.\+h@{physfs.\+h}!P\+H\+Y\+S\+F\+S\+\_\+is\+Symbolic\+Link@{P\+H\+Y\+S\+F\+S\+\_\+is\+Symbolic\+Link}}
\index{P\+H\+Y\+S\+F\+S\+\_\+is\+Symbolic\+Link@{P\+H\+Y\+S\+F\+S\+\_\+is\+Symbolic\+Link}!physfs.\+h@{physfs.\+h}}
\subsubsection{P\+H\+Y\+S\+F\+S\+\_\+is\+Symbolic\+Link()}
{\footnotesize\ttfamily int P\+H\+Y\+S\+F\+S\+\_\+is\+Symbolic\+Link (\begin{DoxyParamCaption}\item[{const char $\ast$}]{fname }\end{DoxyParamCaption})}



Determine if a file in the search path is really a symbolic link. 

\begin{DoxyRefDesc}{Deprecated}
\item[\textbf{ Deprecated}]As of Physics\+FS 2.\+1, use \doxyref{P\+H\+Y\+S\+F\+S\+\_\+stat()}{p.}{physfs_8h_a7f5e23675c50ffe51ad00cceb5a65348} instead. This function just wraps it anyhow.\end{DoxyRefDesc}


Determine if the first occurence of (fname) in the search path is really a symbolic link.

Note that entries that are symlinks are ignored if P\+H\+Y\+S\+F\+S\+\_\+permit\+Symbolic\+Links(1) hasn\textquotesingle{}t been called, and as such, this function will always return 0 in that case.


\begin{DoxyParams}{Parameters}
{\em fname} & filename in platform-\/independent notation. \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
non-\/zero if filename exists and is a symlink. zero otherwise.
\end{DoxyReturn}
\begin{DoxySeeAlso}{See also}
\doxyref{P\+H\+Y\+S\+F\+S\+\_\+stat}{p.}{physfs_8h_a7f5e23675c50ffe51ad00cceb5a65348} 

\doxyref{P\+H\+Y\+S\+F\+S\+\_\+exists}{p.}{physfs_8h_accd31941b636ff153d328aebf72048c7} 
\end{DoxySeeAlso}
\mbox{\label{physfs_8h_ae11fb98bf8c08a2e028f52ac9a728aa9}} 
\index{physfs.\+h@{physfs.\+h}!P\+H\+Y\+S\+F\+S\+\_\+mkdir@{P\+H\+Y\+S\+F\+S\+\_\+mkdir}}
\index{P\+H\+Y\+S\+F\+S\+\_\+mkdir@{P\+H\+Y\+S\+F\+S\+\_\+mkdir}!physfs.\+h@{physfs.\+h}}
\subsubsection{P\+H\+Y\+S\+F\+S\+\_\+mkdir()}
{\footnotesize\ttfamily int P\+H\+Y\+S\+F\+S\+\_\+mkdir (\begin{DoxyParamCaption}\item[{const char $\ast$}]{dir\+Name }\end{DoxyParamCaption})}



Create a directory. 

This is specified in platform-\/independent notation in relation to the write dir. All missing parent directories are also created if they don\textquotesingle{}t exist.

So if you\textquotesingle{}ve got the write dir set to \char`\"{}\+C\+:\textbackslash{}mygame\textbackslash{}writedir\char`\"{} and call P\+H\+Y\+S\+F\+S\+\_\+mkdir(\char`\"{}downloads/maps\char`\"{}) then the directories \char`\"{}\+C\+:\textbackslash{}mygame\textbackslash{}writedir\textbackslash{}downloads\char`\"{} and \char`\"{}\+C\+:\textbackslash{}mygame\textbackslash{}writedir\textbackslash{}downloads\textbackslash{}maps\char`\"{} will be created if possible. If the creation of \char`\"{}maps\char`\"{} fails after we have successfully created \char`\"{}downloads\char`\"{}, then the function leaves the created directory behind and reports failure.


\begin{DoxyParams}{Parameters}
{\em dir\+Name} & New dir to create. \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
nonzero on success, zero on error. Use \doxyref{P\+H\+Y\+S\+F\+S\+\_\+get\+Last\+Error\+Code()}{p.}{physfs_8h_ae916a873aae2cf6b6e09d733cd1b3f4b} to obtain the specific error.
\end{DoxyReturn}
\begin{DoxySeeAlso}{See also}
\doxyref{P\+H\+Y\+S\+F\+S\+\_\+delete}{p.}{physfs_8h_a27a939bce4c1132bacdfcb3d3cc29e37} 
\end{DoxySeeAlso}
\mbox{\label{physfs_8h_a8eb320e9af03dcdb4c05bbff3ea604d4}} 
\index{physfs.\+h@{physfs.\+h}!P\+H\+Y\+S\+F\+S\+\_\+mount@{P\+H\+Y\+S\+F\+S\+\_\+mount}}
\index{P\+H\+Y\+S\+F\+S\+\_\+mount@{P\+H\+Y\+S\+F\+S\+\_\+mount}!physfs.\+h@{physfs.\+h}}
\subsubsection{P\+H\+Y\+S\+F\+S\+\_\+mount()}
{\footnotesize\ttfamily int P\+H\+Y\+S\+F\+S\+\_\+mount (\begin{DoxyParamCaption}\item[{const char $\ast$}]{new\+Dir,  }\item[{const char $\ast$}]{mount\+Point,  }\item[{int}]{append\+To\+Path }\end{DoxyParamCaption})}



Add an archive or directory to the search path. 

If this is a duplicate, the entry is not added again, even though the function succeeds. You may not add the same archive to two different mountpoints\+: duplicate checking is done against the archive and not the mountpoint.

When you mount an archive, it is added to a virtual file system...all files in all of the archives are interpolated into a single hierachical file tree. Two archives mounted at the same place (or an archive with files overlapping another mountpoint) may have overlapping files\+: in such a case, the file earliest in the search path is selected, and the other files are inaccessible to the application. This allows archives to be used to override previous revisions; you can use the mounting mechanism to place archives at a specific point in the file tree and prevent overlap; this is useful for downloadable mods that might trample over application data or each other, for example.

The mountpoint does not need to exist prior to mounting, which is different than those familiar with the Unix concept of \char`\"{}mounting\char`\"{} may expect. As well, more than one archive can be mounted to the same mountpoint, or mountpoints and archive contents can overlap...the interpolation mechanism still functions as usual.

Specifying a symbolic link to an archive or directory is allowed here, regardless of the state of \doxyref{P\+H\+Y\+S\+F\+S\+\_\+permit\+Symbolic\+Links()}{p.}{physfs_8h_aad451d9b3f46f627a1be8caee2eef9b7}. That function only deals with symlinks inside the mounted directory or archive.


\begin{DoxyParams}{Parameters}
{\em new\+Dir} & directory or archive to add to the path, in platform-\/dependent notation. \\
\hline
{\em mount\+Point} & Location in the interpolated tree that this archive will be \char`\"{}mounted\char`\"{}, in platform-\/independent notation. N\+U\+LL or \char`\"{}\char`\"{} is equivalent to \char`\"{}/\char`\"{}. \\
\hline
{\em append\+To\+Path} & nonzero to append to search path, zero to prepend. \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
nonzero if added to path, zero on failure (bogus archive, dir missing, etc). Use \doxyref{P\+H\+Y\+S\+F\+S\+\_\+get\+Last\+Error\+Code()}{p.}{physfs_8h_ae916a873aae2cf6b6e09d733cd1b3f4b} to obtain the specific error.
\end{DoxyReturn}
\begin{DoxySeeAlso}{See also}
\doxyref{P\+H\+Y\+S\+F\+S\+\_\+remove\+From\+Search\+Path}{p.}{physfs_8h_a1e4ed59d6c80b8fb28904723cfd5b510} 

\doxyref{P\+H\+Y\+S\+F\+S\+\_\+get\+Search\+Path}{p.}{physfs_8h_ac738531e9c7e5ca3797b64985c103cf4} 

\doxyref{P\+H\+Y\+S\+F\+S\+\_\+get\+Mount\+Point}{p.}{physfs_8h_a365aee0c326b0e6bfbba5c039f7c4b5b} 

\doxyref{P\+H\+Y\+S\+F\+S\+\_\+mount\+Io}{p.}{physfs_8h_a7ac107cf895f50f0d2219cdf44b8b758} 
\end{DoxySeeAlso}
\mbox{\label{physfs_8h_a05407734c567ced1cffce64c6b1f0e93}} 
\index{physfs.\+h@{physfs.\+h}!P\+H\+Y\+S\+F\+S\+\_\+mount\+Handle@{P\+H\+Y\+S\+F\+S\+\_\+mount\+Handle}}
\index{P\+H\+Y\+S\+F\+S\+\_\+mount\+Handle@{P\+H\+Y\+S\+F\+S\+\_\+mount\+Handle}!physfs.\+h@{physfs.\+h}}
\subsubsection{P\+H\+Y\+S\+F\+S\+\_\+mount\+Handle()}
{\footnotesize\ttfamily int P\+H\+Y\+S\+F\+S\+\_\+mount\+Handle (\begin{DoxyParamCaption}\item[{\textbf{ P\+H\+Y\+S\+F\+S\+\_\+\+File} $\ast$}]{file,  }\item[{const char $\ast$}]{new\+Dir,  }\item[{const char $\ast$}]{mount\+Point,  }\item[{int}]{append\+To\+Path }\end{DoxyParamCaption})}



Add an archive, contained in a \doxyref{P\+H\+Y\+S\+F\+S\+\_\+\+File}{p.}{structPHYSFS__File} handle, to the search path. 

\begin{DoxyWarning}{Warning}
Unless you have some special, low-\/level need, you should be using \doxyref{P\+H\+Y\+S\+F\+S\+\_\+mount()}{p.}{physfs_8h_a8eb320e9af03dcdb4c05bbff3ea604d4} instead of this.

Archives-\/in-\/archives may be very slow! While a \doxyref{P\+H\+Y\+S\+F\+S\+\_\+\+File}{p.}{structPHYSFS__File} can seek even when the data is compressed, it may do so by rewinding to the start and decompressing everything before the seek point. Normal archive usage may do a lot of seeking behind the scenes. As such, you might find normal archive usage extremely painful if mounted this way. Plan accordingly\+: if you, say, have a self-\/extracting .zip file, and want to mount something in it, compress the contents of the inner archive and make sure the outer .zip file doesn\textquotesingle{}t compress the inner archive too.
\end{DoxyWarning}
This function operates just like \doxyref{P\+H\+Y\+S\+F\+S\+\_\+mount()}{p.}{physfs_8h_a8eb320e9af03dcdb4c05bbff3ea604d4}, but takes a \doxyref{P\+H\+Y\+S\+F\+S\+\_\+\+File}{p.}{structPHYSFS__File} handle instead of a pathname. This handle contains all the data of the archive, and is used instead of a real file in the physical filesystem. The \doxyref{P\+H\+Y\+S\+F\+S\+\_\+\+File}{p.}{structPHYSFS__File} may be backed by a real file in the physical filesystem, but isn\textquotesingle{}t necessarily. The most popular use for this is likely to mount archives stored inside other archives.

(new\+Dir) must be a unique string to identify this archive. It is used to optimize archiver selection (if you name it X\+X\+X\+X\+X.\+zip, we might try the Z\+IP archiver first, for example, or directly choose an archiver that can only trust the data is valid by filename extension). It doesn\textquotesingle{}t need to refer to a real file at all. If the filename extension isn\textquotesingle{}t helpful, the system will try every archiver until one works or none of them do. This filename must be unique, as the system won\textquotesingle{}t allow you to have two archives with the same name.

(file) must remain until the archive is unmounted. When the archive is unmounted, the system will call P\+H\+Y\+S\+F\+S\+\_\+close(file). If you need this handle to survive, you will have to wrap this in a \doxyref{P\+H\+Y\+S\+F\+S\+\_\+\+Io}{p.}{structPHYSFS__Io} and use \doxyref{P\+H\+Y\+S\+F\+S\+\_\+mount\+Io()}{p.}{physfs_8h_a7ac107cf895f50f0d2219cdf44b8b758} instead.

If this function fails, P\+H\+Y\+S\+F\+S\+\_\+close(file) is not called.


\begin{DoxyParams}{Parameters}
{\em file} & The \doxyref{P\+H\+Y\+S\+F\+S\+\_\+\+File}{p.}{structPHYSFS__File} handle containing archive data. \\
\hline
{\em new\+Dir} & Filename that can represent this stream. \\
\hline
{\em mount\+Point} & Location in the interpolated tree that this archive will be \char`\"{}mounted\char`\"{}, in platform-\/independent notation. N\+U\+LL or \char`\"{}\char`\"{} is equivalent to \char`\"{}/\char`\"{}. \\
\hline
{\em append\+To\+Path} & nonzero to append to search path, zero to prepend. \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
nonzero if added to path, zero on failure (bogus archive, etc). Use \doxyref{P\+H\+Y\+S\+F\+S\+\_\+get\+Last\+Error\+Code()}{p.}{physfs_8h_ae916a873aae2cf6b6e09d733cd1b3f4b} to obtain the specific error.
\end{DoxyReturn}
\begin{DoxySeeAlso}{See also}
\doxyref{P\+H\+Y\+S\+F\+S\+\_\+unmount}{p.}{physfs_8h_aab0e2ba90aa918b2ee1ed7c40293b442} 

\doxyref{P\+H\+Y\+S\+F\+S\+\_\+get\+Search\+Path}{p.}{physfs_8h_ac738531e9c7e5ca3797b64985c103cf4} 

\doxyref{P\+H\+Y\+S\+F\+S\+\_\+get\+Mount\+Point}{p.}{physfs_8h_a365aee0c326b0e6bfbba5c039f7c4b5b} 
\end{DoxySeeAlso}
\mbox{\label{physfs_8h_a7ac107cf895f50f0d2219cdf44b8b758}} 
\index{physfs.\+h@{physfs.\+h}!P\+H\+Y\+S\+F\+S\+\_\+mount\+Io@{P\+H\+Y\+S\+F\+S\+\_\+mount\+Io}}
\index{P\+H\+Y\+S\+F\+S\+\_\+mount\+Io@{P\+H\+Y\+S\+F\+S\+\_\+mount\+Io}!physfs.\+h@{physfs.\+h}}
\subsubsection{P\+H\+Y\+S\+F\+S\+\_\+mount\+Io()}
{\footnotesize\ttfamily int P\+H\+Y\+S\+F\+S\+\_\+mount\+Io (\begin{DoxyParamCaption}\item[{\textbf{ P\+H\+Y\+S\+F\+S\+\_\+\+Io} $\ast$}]{io,  }\item[{const char $\ast$}]{new\+Dir,  }\item[{const char $\ast$}]{mount\+Point,  }\item[{int}]{append\+To\+Path }\end{DoxyParamCaption})}



Add an archive, built on a \doxyref{P\+H\+Y\+S\+F\+S\+\_\+\+Io}{p.}{structPHYSFS__Io}, to the search path. 

\begin{DoxyWarning}{Warning}
Unless you have some special, low-\/level need, you should be using \doxyref{P\+H\+Y\+S\+F\+S\+\_\+mount()}{p.}{physfs_8h_a8eb320e9af03dcdb4c05bbff3ea604d4} instead of this.
\end{DoxyWarning}
This function operates just like \doxyref{P\+H\+Y\+S\+F\+S\+\_\+mount()}{p.}{physfs_8h_a8eb320e9af03dcdb4c05bbff3ea604d4}, but takes a \doxyref{P\+H\+Y\+S\+F\+S\+\_\+\+Io}{p.}{structPHYSFS__Io} instead of a pathname. Behind the scenes, \doxyref{P\+H\+Y\+S\+F\+S\+\_\+mount()}{p.}{physfs_8h_a8eb320e9af03dcdb4c05bbff3ea604d4} calls this function with a physical-\/filesystem-\/based \doxyref{P\+H\+Y\+S\+F\+S\+\_\+\+Io}{p.}{structPHYSFS__Io}.

(new\+Dir) must be a unique string to identify this archive. It is used to optimize archiver selection (if you name it X\+X\+X\+X\+X.\+zip, we might try the Z\+IP archiver first, for example, or directly choose an archiver that can only trust the data is valid by filename extension). It doesn\textquotesingle{}t need to refer to a real file at all. If the filename extension isn\textquotesingle{}t helpful, the system will try every archiver until one works or none of them do. This filename must be unique, as the system won\textquotesingle{}t allow you to have two archives with the same name.

(io) must remain until the archive is unmounted. When the archive is unmounted, the system will call (io)-\/$>$destroy(io), which will give you a chance to free your resources.

If this function fails, (io)-\/$>$destroy(io) is not called.


\begin{DoxyParams}{Parameters}
{\em io} & i/o instance for archive to add to the path. \\
\hline
{\em new\+Dir} & Filename that can represent this stream. \\
\hline
{\em mount\+Point} & Location in the interpolated tree that this archive will be \char`\"{}mounted\char`\"{}, in platform-\/independent notation. N\+U\+LL or \char`\"{}\char`\"{} is equivalent to \char`\"{}/\char`\"{}. \\
\hline
{\em append\+To\+Path} & nonzero to append to search path, zero to prepend. \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
nonzero if added to path, zero on failure (bogus archive, stream i/o issue, etc). Use \doxyref{P\+H\+Y\+S\+F\+S\+\_\+get\+Last\+Error\+Code()}{p.}{physfs_8h_ae916a873aae2cf6b6e09d733cd1b3f4b} to obtain the specific error.
\end{DoxyReturn}
\begin{DoxySeeAlso}{See also}
\doxyref{P\+H\+Y\+S\+F\+S\+\_\+unmount}{p.}{physfs_8h_aab0e2ba90aa918b2ee1ed7c40293b442} 

\doxyref{P\+H\+Y\+S\+F\+S\+\_\+get\+Search\+Path}{p.}{physfs_8h_ac738531e9c7e5ca3797b64985c103cf4} 

\doxyref{P\+H\+Y\+S\+F\+S\+\_\+get\+Mount\+Point}{p.}{physfs_8h_a365aee0c326b0e6bfbba5c039f7c4b5b} 
\end{DoxySeeAlso}
\mbox{\label{physfs_8h_a0a977d04da585859e132ba4700df5d3a}} 
\index{physfs.\+h@{physfs.\+h}!P\+H\+Y\+S\+F\+S\+\_\+mount\+Memory@{P\+H\+Y\+S\+F\+S\+\_\+mount\+Memory}}
\index{P\+H\+Y\+S\+F\+S\+\_\+mount\+Memory@{P\+H\+Y\+S\+F\+S\+\_\+mount\+Memory}!physfs.\+h@{physfs.\+h}}
\subsubsection{P\+H\+Y\+S\+F\+S\+\_\+mount\+Memory()}
{\footnotesize\ttfamily int P\+H\+Y\+S\+F\+S\+\_\+mount\+Memory (\begin{DoxyParamCaption}\item[{const void $\ast$}]{buf,  }\item[{\textbf{ P\+H\+Y\+S\+F\+S\+\_\+uint64}}]{len,  }\item[{void($\ast$)(void $\ast$)}]{del,  }\item[{const char $\ast$}]{new\+Dir,  }\item[{const char $\ast$}]{mount\+Point,  }\item[{int}]{append\+To\+Path }\end{DoxyParamCaption})}



Add an archive, contained in a memory buffer, to the search path. 

\begin{DoxyWarning}{Warning}
Unless you have some special, low-\/level need, you should be using \doxyref{P\+H\+Y\+S\+F\+S\+\_\+mount()}{p.}{physfs_8h_a8eb320e9af03dcdb4c05bbff3ea604d4} instead of this.
\end{DoxyWarning}
This function operates just like \doxyref{P\+H\+Y\+S\+F\+S\+\_\+mount()}{p.}{physfs_8h_a8eb320e9af03dcdb4c05bbff3ea604d4}, but takes a memory buffer instead of a pathname. This buffer contains all the data of the archive, and is used instead of a real file in the physical filesystem.

(new\+Dir) must be a unique string to identify this archive. It is used to optimize archiver selection (if you name it X\+X\+X\+X\+X.\+zip, we might try the Z\+IP archiver first, for example, or directly choose an archiver that can only trust the data is valid by filename extension). It doesn\textquotesingle{}t need to refer to a real file at all. If the filename extension isn\textquotesingle{}t helpful, the system will try every archiver until one works or none of them do. This filename must be unique, as the system won\textquotesingle{}t allow you to have two archives with the same name.

(ptr) must remain until the archive is unmounted. When the archive is unmounted, the system will call (del)(ptr), which will notify you that the system is done with the buffer, and give you a chance to free your resources. (del) can be N\+U\+LL, in which case the system will make no attempt to free the buffer.

If this function fails, (del) is not called.


\begin{DoxyParams}{Parameters}
{\em buf} & Address of the memory buffer containing the archive data. \\
\hline
{\em len} & Size of memory buffer, in bytes. \\
\hline
{\em del} & A callback that triggers upon unmount. Can be N\+U\+LL. \\
\hline
{\em new\+Dir} & Filename that can represent this stream. \\
\hline
{\em mount\+Point} & Location in the interpolated tree that this archive will be \char`\"{}mounted\char`\"{}, in platform-\/independent notation. N\+U\+LL or \char`\"{}\char`\"{} is equivalent to \char`\"{}/\char`\"{}. \\
\hline
{\em append\+To\+Path} & nonzero to append to search path, zero to prepend. \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
nonzero if added to path, zero on failure (bogus archive, etc). Use \doxyref{P\+H\+Y\+S\+F\+S\+\_\+get\+Last\+Error\+Code()}{p.}{physfs_8h_ae916a873aae2cf6b6e09d733cd1b3f4b} to obtain the specific error.
\end{DoxyReturn}
\begin{DoxySeeAlso}{See also}
\doxyref{P\+H\+Y\+S\+F\+S\+\_\+unmount}{p.}{physfs_8h_aab0e2ba90aa918b2ee1ed7c40293b442} 

\doxyref{P\+H\+Y\+S\+F\+S\+\_\+get\+Search\+Path}{p.}{physfs_8h_ac738531e9c7e5ca3797b64985c103cf4} 

\doxyref{P\+H\+Y\+S\+F\+S\+\_\+get\+Mount\+Point}{p.}{physfs_8h_a365aee0c326b0e6bfbba5c039f7c4b5b} 
\end{DoxySeeAlso}
\mbox{\label{physfs_8h_abeeca12e2fe7c5f68cbd67e2e5cafa3d}} 
\index{physfs.\+h@{physfs.\+h}!P\+H\+Y\+S\+F\+S\+\_\+open\+Append@{P\+H\+Y\+S\+F\+S\+\_\+open\+Append}}
\index{P\+H\+Y\+S\+F\+S\+\_\+open\+Append@{P\+H\+Y\+S\+F\+S\+\_\+open\+Append}!physfs.\+h@{physfs.\+h}}
\subsubsection{P\+H\+Y\+S\+F\+S\+\_\+open\+Append()}
{\footnotesize\ttfamily \textbf{ P\+H\+Y\+S\+F\+S\+\_\+\+File} $\ast$ P\+H\+Y\+S\+F\+S\+\_\+open\+Append (\begin{DoxyParamCaption}\item[{const char $\ast$}]{filename }\end{DoxyParamCaption})}



Open a file for appending. 

Open a file for writing, in platform-\/independent notation and in relation to the write dir as the root of the writable filesystem. The specified file is created if it doesn\textquotesingle{}t exist. If it does exist, the writing offset is set to the end of the file, so the first write will be the byte after the end.

Note that entries that are symlinks are ignored if P\+H\+Y\+S\+F\+S\+\_\+permit\+Symbolic\+Links(1) hasn\textquotesingle{}t been called, and opening a symlink with this function will fail in such a case.


\begin{DoxyParams}{Parameters}
{\em filename} & File to open. \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
A valid Physics\+FS filehandle on success, N\+U\+LL on error. Use \doxyref{P\+H\+Y\+S\+F\+S\+\_\+get\+Last\+Error\+Code()}{p.}{physfs_8h_ae916a873aae2cf6b6e09d733cd1b3f4b} to obtain the specific error.
\end{DoxyReturn}
\begin{DoxySeeAlso}{See also}
\doxyref{P\+H\+Y\+S\+F\+S\+\_\+open\+Read}{p.}{physfs_8h_a5e38a425bb0b44c09ec25b105f770c63} 

\doxyref{P\+H\+Y\+S\+F\+S\+\_\+open\+Write}{p.}{physfs_8h_abbf92d66c6cb82d0ede969aa2c964fba} 

\doxyref{P\+H\+Y\+S\+F\+S\+\_\+write}{p.}{physfs_8h_af5dc83d5e4ef0b0c9bce1834ea1bb498} 

\doxyref{P\+H\+Y\+S\+F\+S\+\_\+close}{p.}{physfs_8h_a6822f8ff10073e855a1c3a6485b882f2} 
\end{DoxySeeAlso}
\mbox{\label{physfs_8h_a5e38a425bb0b44c09ec25b105f770c63}} 
\index{physfs.\+h@{physfs.\+h}!P\+H\+Y\+S\+F\+S\+\_\+open\+Read@{P\+H\+Y\+S\+F\+S\+\_\+open\+Read}}
\index{P\+H\+Y\+S\+F\+S\+\_\+open\+Read@{P\+H\+Y\+S\+F\+S\+\_\+open\+Read}!physfs.\+h@{physfs.\+h}}
\subsubsection{P\+H\+Y\+S\+F\+S\+\_\+open\+Read()}
{\footnotesize\ttfamily \textbf{ P\+H\+Y\+S\+F\+S\+\_\+\+File} $\ast$ P\+H\+Y\+S\+F\+S\+\_\+open\+Read (\begin{DoxyParamCaption}\item[{const char $\ast$}]{filename }\end{DoxyParamCaption})}



Open a file for reading. 

Open a file for reading, in platform-\/independent notation. The search path is checked one at a time until a matching file is found, in which case an abstract filehandle is associated with it, and reading may be done. The reading offset is set to the first byte of the file.

Note that entries that are symlinks are ignored if P\+H\+Y\+S\+F\+S\+\_\+permit\+Symbolic\+Links(1) hasn\textquotesingle{}t been called, and opening a symlink with this function will fail in such a case.


\begin{DoxyParams}{Parameters}
{\em filename} & File to open. \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
A valid Physics\+FS filehandle on success, N\+U\+LL on error. Use \doxyref{P\+H\+Y\+S\+F\+S\+\_\+get\+Last\+Error\+Code()}{p.}{physfs_8h_ae916a873aae2cf6b6e09d733cd1b3f4b} to obtain the specific error.
\end{DoxyReturn}
\begin{DoxySeeAlso}{See also}
\doxyref{P\+H\+Y\+S\+F\+S\+\_\+open\+Write}{p.}{physfs_8h_abbf92d66c6cb82d0ede969aa2c964fba} 

\doxyref{P\+H\+Y\+S\+F\+S\+\_\+open\+Append}{p.}{physfs_8h_abeeca12e2fe7c5f68cbd67e2e5cafa3d} 

\doxyref{P\+H\+Y\+S\+F\+S\+\_\+read}{p.}{physfs_8h_a91234f576477f7de67d635761d01aa7b} 

\doxyref{P\+H\+Y\+S\+F\+S\+\_\+close}{p.}{physfs_8h_a6822f8ff10073e855a1c3a6485b882f2} 
\end{DoxySeeAlso}
\mbox{\label{physfs_8h_abbf92d66c6cb82d0ede969aa2c964fba}} 
\index{physfs.\+h@{physfs.\+h}!P\+H\+Y\+S\+F\+S\+\_\+open\+Write@{P\+H\+Y\+S\+F\+S\+\_\+open\+Write}}
\index{P\+H\+Y\+S\+F\+S\+\_\+open\+Write@{P\+H\+Y\+S\+F\+S\+\_\+open\+Write}!physfs.\+h@{physfs.\+h}}
\subsubsection{P\+H\+Y\+S\+F\+S\+\_\+open\+Write()}
{\footnotesize\ttfamily \textbf{ P\+H\+Y\+S\+F\+S\+\_\+\+File} $\ast$ P\+H\+Y\+S\+F\+S\+\_\+open\+Write (\begin{DoxyParamCaption}\item[{const char $\ast$}]{filename }\end{DoxyParamCaption})}



Open a file for writing. 

Open a file for writing, in platform-\/independent notation and in relation to the write dir as the root of the writable filesystem. The specified file is created if it doesn\textquotesingle{}t exist. If it does exist, it is truncated to zero bytes, and the writing offset is set to the start.

Note that entries that are symlinks are ignored if P\+H\+Y\+S\+F\+S\+\_\+permit\+Symbolic\+Links(1) hasn\textquotesingle{}t been called, and opening a symlink with this function will fail in such a case.


\begin{DoxyParams}{Parameters}
{\em filename} & File to open. \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
A valid Physics\+FS filehandle on success, N\+U\+LL on error. Use \doxyref{P\+H\+Y\+S\+F\+S\+\_\+get\+Last\+Error\+Code()}{p.}{physfs_8h_ae916a873aae2cf6b6e09d733cd1b3f4b} to obtain the specific error.
\end{DoxyReturn}
\begin{DoxySeeAlso}{See also}
\doxyref{P\+H\+Y\+S\+F\+S\+\_\+open\+Read}{p.}{physfs_8h_a5e38a425bb0b44c09ec25b105f770c63} 

\doxyref{P\+H\+Y\+S\+F\+S\+\_\+open\+Append}{p.}{physfs_8h_abeeca12e2fe7c5f68cbd67e2e5cafa3d} 

\doxyref{P\+H\+Y\+S\+F\+S\+\_\+write}{p.}{physfs_8h_af5dc83d5e4ef0b0c9bce1834ea1bb498} 

\doxyref{P\+H\+Y\+S\+F\+S\+\_\+close}{p.}{physfs_8h_a6822f8ff10073e855a1c3a6485b882f2} 
\end{DoxySeeAlso}
\mbox{\label{physfs_8h_aad451d9b3f46f627a1be8caee2eef9b7}} 
\index{physfs.\+h@{physfs.\+h}!P\+H\+Y\+S\+F\+S\+\_\+permit\+Symbolic\+Links@{P\+H\+Y\+S\+F\+S\+\_\+permit\+Symbolic\+Links}}
\index{P\+H\+Y\+S\+F\+S\+\_\+permit\+Symbolic\+Links@{P\+H\+Y\+S\+F\+S\+\_\+permit\+Symbolic\+Links}!physfs.\+h@{physfs.\+h}}
\subsubsection{P\+H\+Y\+S\+F\+S\+\_\+permit\+Symbolic\+Links()}
{\footnotesize\ttfamily void P\+H\+Y\+S\+F\+S\+\_\+permit\+Symbolic\+Links (\begin{DoxyParamCaption}\item[{int}]{allow }\end{DoxyParamCaption})}



Enable or disable following of symbolic links. 

Some physical filesystems and archives contain files that are just pointers to other files. On the physical filesystem, opening such a link will (transparently) open the file that is pointed to.

By default, Physics\+FS will check if a file is really a symlink during open calls and fail if it is. Otherwise, the link could take you outside the write and search paths, and compromise security.

If you want to take that risk, call this function with a non-\/zero parameter. Note that this is more for sandboxing a program\textquotesingle{}s scripting language, in case untrusted scripts try to compromise the system. Generally speaking, a user could very well have a legitimate reason to set up a symlink, so unless you feel there\textquotesingle{}s a specific danger in allowing them, you should permit them.

Symlinks are only explicitly checked when dealing with filenames in platform-\/independent notation. That is, when setting up your search and write paths, etc, symlinks are never checked for.

Please note that \doxyref{P\+H\+Y\+S\+F\+S\+\_\+stat()}{p.}{physfs_8h_a7f5e23675c50ffe51ad00cceb5a65348} will always check the path specified; if that path is a symlink, it will not be followed in any case. If symlinks aren\textquotesingle{}t permitted through this function, \doxyref{P\+H\+Y\+S\+F\+S\+\_\+stat()}{p.}{physfs_8h_a7f5e23675c50ffe51ad00cceb5a65348} ignores them, and would treat the query as if the path didn\textquotesingle{}t exist at all.

Symbolic link permission can be enabled or disabled at any time after you\textquotesingle{}ve called \doxyref{P\+H\+Y\+S\+F\+S\+\_\+init()}{p.}{physfs_8h_a61b94cac8e65267afb8a5f2344e60dd1}, and is disabled by default.


\begin{DoxyParams}{Parameters}
{\em allow} & nonzero to permit symlinks, zero to deny linking.\\
\hline
\end{DoxyParams}
\begin{DoxySeeAlso}{See also}
\doxyref{P\+H\+Y\+S\+F\+S\+\_\+symbolic\+Links\+Permitted}{p.}{physfs_8h_a5223ccbe06246dd5379d6a57d6cd0d87} 
\end{DoxySeeAlso}
\mbox{\label{physfs_8h_a91234f576477f7de67d635761d01aa7b}} 
\index{physfs.\+h@{physfs.\+h}!P\+H\+Y\+S\+F\+S\+\_\+read@{P\+H\+Y\+S\+F\+S\+\_\+read}}
\index{P\+H\+Y\+S\+F\+S\+\_\+read@{P\+H\+Y\+S\+F\+S\+\_\+read}!physfs.\+h@{physfs.\+h}}
\subsubsection{P\+H\+Y\+S\+F\+S\+\_\+read()}
{\footnotesize\ttfamily \textbf{ P\+H\+Y\+S\+F\+S\+\_\+sint64} P\+H\+Y\+S\+F\+S\+\_\+read (\begin{DoxyParamCaption}\item[{\textbf{ P\+H\+Y\+S\+F\+S\+\_\+\+File} $\ast$}]{handle,  }\item[{void $\ast$}]{buffer,  }\item[{\textbf{ P\+H\+Y\+S\+F\+S\+\_\+uint32}}]{obj\+Size,  }\item[{\textbf{ P\+H\+Y\+S\+F\+S\+\_\+uint32}}]{obj\+Count }\end{DoxyParamCaption})}



Read data from a Physics\+FS filehandle. 

The file must be opened for reading.

\begin{DoxyRefDesc}{Deprecated}
\item[\textbf{ Deprecated}]As of Physics\+FS 2.\+1, use \doxyref{P\+H\+Y\+S\+F\+S\+\_\+read\+Bytes()}{p.}{physfs_8h_a63ac40ecdb3f9b91e6ee309bdbad0ce8} instead. This function just wraps it anyhow. This function never clarified what would happen if you managed to read a partial object, so working at the byte level makes this cleaner for everyone, especially now that \doxyref{P\+H\+Y\+S\+F\+S\+\_\+\+Io}{p.}{structPHYSFS__Io} interfaces can be supplied by the application.\end{DoxyRefDesc}



\begin{DoxyParams}{Parameters}
{\em handle} & handle returned from \doxyref{P\+H\+Y\+S\+F\+S\+\_\+open\+Read()}{p.}{physfs_8h_a5e38a425bb0b44c09ec25b105f770c63}. \\
\hline
{\em buffer} & buffer to store read data into. \\
\hline
{\em obj\+Size} & size in bytes of objects being read from (handle). \\
\hline
{\em obj\+Count} & number of (obj\+Size) objects to read from (handle). \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
number of objects read. \doxyref{P\+H\+Y\+S\+F\+S\+\_\+get\+Last\+Error\+Code()}{p.}{physfs_8h_ae916a873aae2cf6b6e09d733cd1b3f4b} can shed light on the reason this might be $<$ (obj\+Count), as can \doxyref{P\+H\+Y\+S\+F\+S\+\_\+eof()}{p.}{physfs_8h_a6d7ac838797951323072060392645dbe}. -\/1 if complete failure.
\end{DoxyReturn}
\begin{DoxySeeAlso}{See also}
\doxyref{P\+H\+Y\+S\+F\+S\+\_\+read\+Bytes}{p.}{physfs_8h_a63ac40ecdb3f9b91e6ee309bdbad0ce8} 

\doxyref{P\+H\+Y\+S\+F\+S\+\_\+eof}{p.}{physfs_8h_a6d7ac838797951323072060392645dbe} 
\end{DoxySeeAlso}
\mbox{\label{physfs_8h_a63ac40ecdb3f9b91e6ee309bdbad0ce8}} 
\index{physfs.\+h@{physfs.\+h}!P\+H\+Y\+S\+F\+S\+\_\+read\+Bytes@{P\+H\+Y\+S\+F\+S\+\_\+read\+Bytes}}
\index{P\+H\+Y\+S\+F\+S\+\_\+read\+Bytes@{P\+H\+Y\+S\+F\+S\+\_\+read\+Bytes}!physfs.\+h@{physfs.\+h}}
\subsubsection{P\+H\+Y\+S\+F\+S\+\_\+read\+Bytes()}
{\footnotesize\ttfamily \textbf{ P\+H\+Y\+S\+F\+S\+\_\+sint64} P\+H\+Y\+S\+F\+S\+\_\+read\+Bytes (\begin{DoxyParamCaption}\item[{\textbf{ P\+H\+Y\+S\+F\+S\+\_\+\+File} $\ast$}]{handle,  }\item[{void $\ast$}]{buffer,  }\item[{\textbf{ P\+H\+Y\+S\+F\+S\+\_\+uint64}}]{len }\end{DoxyParamCaption})}



Read bytes from a Physics\+FS filehandle. 

The file must be opened for reading.


\begin{DoxyParams}{Parameters}
{\em handle} & handle returned from \doxyref{P\+H\+Y\+S\+F\+S\+\_\+open\+Read()}{p.}{physfs_8h_a5e38a425bb0b44c09ec25b105f770c63}. \\
\hline
{\em buffer} & buffer of at least (len) bytes to store read data into. \\
\hline
{\em len} & number of bytes being read from (handle). \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
number of bytes read. This may be less than (len); this does not signify an error, necessarily (a short read may mean E\+OF). \doxyref{P\+H\+Y\+S\+F\+S\+\_\+get\+Last\+Error\+Code()}{p.}{physfs_8h_ae916a873aae2cf6b6e09d733cd1b3f4b} can shed light on the reason this might be $<$ (len), as can \doxyref{P\+H\+Y\+S\+F\+S\+\_\+eof()}{p.}{physfs_8h_a6d7ac838797951323072060392645dbe}. -\/1 if complete failure.
\end{DoxyReturn}
\begin{DoxySeeAlso}{See also}
\doxyref{P\+H\+Y\+S\+F\+S\+\_\+eof}{p.}{physfs_8h_a6d7ac838797951323072060392645dbe} 
\end{DoxySeeAlso}
\mbox{\label{physfs_8h_ad524c869540cc428264c318330a89144}} 
\index{physfs.\+h@{physfs.\+h}!P\+H\+Y\+S\+F\+S\+\_\+read\+S\+B\+E16@{P\+H\+Y\+S\+F\+S\+\_\+read\+S\+B\+E16}}
\index{P\+H\+Y\+S\+F\+S\+\_\+read\+S\+B\+E16@{P\+H\+Y\+S\+F\+S\+\_\+read\+S\+B\+E16}!physfs.\+h@{physfs.\+h}}
\subsubsection{P\+H\+Y\+S\+F\+S\+\_\+read\+S\+B\+E16()}
{\footnotesize\ttfamily int P\+H\+Y\+S\+F\+S\+\_\+read\+S\+B\+E16 (\begin{DoxyParamCaption}\item[{\textbf{ P\+H\+Y\+S\+F\+S\+\_\+\+File} $\ast$}]{file,  }\item[{\textbf{ P\+H\+Y\+S\+F\+S\+\_\+sint16} $\ast$}]{val }\end{DoxyParamCaption})}



Read and convert a signed 16-\/bit bigendian value. 

Convenience function. Read a signed 16-\/bit bigendian value from a file and convert it to the platform\textquotesingle{}s native byte order.


\begin{DoxyParams}{Parameters}
{\em file} & Physics\+FS file handle from which to read. \\
\hline
{\em val} & pointer to where value should be stored. \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
zero on failure, non-\/zero on success. If successful, ($\ast$val) will store the result. On failure, you can find out what went wrong from \doxyref{P\+H\+Y\+S\+F\+S\+\_\+get\+Last\+Error\+Code()}{p.}{physfs_8h_ae916a873aae2cf6b6e09d733cd1b3f4b}. 
\end{DoxyReturn}
\mbox{\label{physfs_8h_aab2bc016ea5dbe2a91479045576e644d}} 
\index{physfs.\+h@{physfs.\+h}!P\+H\+Y\+S\+F\+S\+\_\+read\+S\+B\+E32@{P\+H\+Y\+S\+F\+S\+\_\+read\+S\+B\+E32}}
\index{P\+H\+Y\+S\+F\+S\+\_\+read\+S\+B\+E32@{P\+H\+Y\+S\+F\+S\+\_\+read\+S\+B\+E32}!physfs.\+h@{physfs.\+h}}
\subsubsection{P\+H\+Y\+S\+F\+S\+\_\+read\+S\+B\+E32()}
{\footnotesize\ttfamily int P\+H\+Y\+S\+F\+S\+\_\+read\+S\+B\+E32 (\begin{DoxyParamCaption}\item[{\textbf{ P\+H\+Y\+S\+F\+S\+\_\+\+File} $\ast$}]{file,  }\item[{\textbf{ P\+H\+Y\+S\+F\+S\+\_\+sint32} $\ast$}]{val }\end{DoxyParamCaption})}



Read and convert a signed 32-\/bit bigendian value. 

Convenience function. Read a signed 32-\/bit bigendian value from a file and convert it to the platform\textquotesingle{}s native byte order.


\begin{DoxyParams}{Parameters}
{\em file} & Physics\+FS file handle from which to read. \\
\hline
{\em val} & pointer to where value should be stored. \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
zero on failure, non-\/zero on success. If successful, ($\ast$val) will store the result. On failure, you can find out what went wrong from \doxyref{P\+H\+Y\+S\+F\+S\+\_\+get\+Last\+Error\+Code()}{p.}{physfs_8h_ae916a873aae2cf6b6e09d733cd1b3f4b}. 
\end{DoxyReturn}
\mbox{\label{physfs_8h_a04eabd9e8da4265ede4018b24d4a39b1}} 
\index{physfs.\+h@{physfs.\+h}!P\+H\+Y\+S\+F\+S\+\_\+read\+S\+B\+E64@{P\+H\+Y\+S\+F\+S\+\_\+read\+S\+B\+E64}}
\index{P\+H\+Y\+S\+F\+S\+\_\+read\+S\+B\+E64@{P\+H\+Y\+S\+F\+S\+\_\+read\+S\+B\+E64}!physfs.\+h@{physfs.\+h}}
\subsubsection{P\+H\+Y\+S\+F\+S\+\_\+read\+S\+B\+E64()}
{\footnotesize\ttfamily int P\+H\+Y\+S\+F\+S\+\_\+read\+S\+B\+E64 (\begin{DoxyParamCaption}\item[{\textbf{ P\+H\+Y\+S\+F\+S\+\_\+\+File} $\ast$}]{file,  }\item[{\textbf{ P\+H\+Y\+S\+F\+S\+\_\+sint64} $\ast$}]{val }\end{DoxyParamCaption})}



Read and convert a signed 64-\/bit bigendian value. 

Convenience function. Read a signed 64-\/bit bigendian value from a file and convert it to the platform\textquotesingle{}s native byte order.


\begin{DoxyParams}{Parameters}
{\em file} & Physics\+FS file handle from which to read. \\
\hline
{\em val} & pointer to where value should be stored. \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
zero on failure, non-\/zero on success. If successful, ($\ast$val) will store the result. On failure, you can find out what went wrong from \doxyref{P\+H\+Y\+S\+F\+S\+\_\+get\+Last\+Error\+Code()}{p.}{physfs_8h_ae916a873aae2cf6b6e09d733cd1b3f4b}.
\end{DoxyReturn}
\begin{DoxyWarning}{Warning}
Remember, P\+H\+Y\+S\+F\+S\+\_\+sint64 is only 32 bits on platforms without any sort of 64-\/bit support. 
\end{DoxyWarning}
\mbox{\label{physfs_8h_a0959e10405416c139aad78dbc21617a0}} 
\index{physfs.\+h@{physfs.\+h}!P\+H\+Y\+S\+F\+S\+\_\+read\+S\+L\+E16@{P\+H\+Y\+S\+F\+S\+\_\+read\+S\+L\+E16}}
\index{P\+H\+Y\+S\+F\+S\+\_\+read\+S\+L\+E16@{P\+H\+Y\+S\+F\+S\+\_\+read\+S\+L\+E16}!physfs.\+h@{physfs.\+h}}
\subsubsection{P\+H\+Y\+S\+F\+S\+\_\+read\+S\+L\+E16()}
{\footnotesize\ttfamily int P\+H\+Y\+S\+F\+S\+\_\+read\+S\+L\+E16 (\begin{DoxyParamCaption}\item[{\textbf{ P\+H\+Y\+S\+F\+S\+\_\+\+File} $\ast$}]{file,  }\item[{\textbf{ P\+H\+Y\+S\+F\+S\+\_\+sint16} $\ast$}]{val }\end{DoxyParamCaption})}



Read and convert a signed 16-\/bit littleendian value. 

Convenience function. Read a signed 16-\/bit littleendian value from a file and convert it to the platform\textquotesingle{}s native byte order.


\begin{DoxyParams}{Parameters}
{\em file} & Physics\+FS file handle from which to read. \\
\hline
{\em val} & pointer to where value should be stored. \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
zero on failure, non-\/zero on success. If successful, ($\ast$val) will store the result. On failure, you can find out what went wrong from \doxyref{P\+H\+Y\+S\+F\+S\+\_\+get\+Last\+Error\+Code()}{p.}{physfs_8h_ae916a873aae2cf6b6e09d733cd1b3f4b}. 
\end{DoxyReturn}
\mbox{\label{physfs_8h_a2e2bfb4e8204c99f75642c4833e18566}} 
\index{physfs.\+h@{physfs.\+h}!P\+H\+Y\+S\+F\+S\+\_\+read\+S\+L\+E32@{P\+H\+Y\+S\+F\+S\+\_\+read\+S\+L\+E32}}
\index{P\+H\+Y\+S\+F\+S\+\_\+read\+S\+L\+E32@{P\+H\+Y\+S\+F\+S\+\_\+read\+S\+L\+E32}!physfs.\+h@{physfs.\+h}}
\subsubsection{P\+H\+Y\+S\+F\+S\+\_\+read\+S\+L\+E32()}
{\footnotesize\ttfamily int P\+H\+Y\+S\+F\+S\+\_\+read\+S\+L\+E32 (\begin{DoxyParamCaption}\item[{\textbf{ P\+H\+Y\+S\+F\+S\+\_\+\+File} $\ast$}]{file,  }\item[{\textbf{ P\+H\+Y\+S\+F\+S\+\_\+sint32} $\ast$}]{val }\end{DoxyParamCaption})}



Read and convert a signed 32-\/bit littleendian value. 

Convenience function. Read a signed 32-\/bit littleendian value from a file and convert it to the platform\textquotesingle{}s native byte order.


\begin{DoxyParams}{Parameters}
{\em file} & Physics\+FS file handle from which to read. \\
\hline
{\em val} & pointer to where value should be stored. \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
zero on failure, non-\/zero on success. If successful, ($\ast$val) will store the result. On failure, you can find out what went wrong from \doxyref{P\+H\+Y\+S\+F\+S\+\_\+get\+Last\+Error\+Code()}{p.}{physfs_8h_ae916a873aae2cf6b6e09d733cd1b3f4b}. 
\end{DoxyReturn}
\mbox{\label{physfs_8h_ae916644039fad7ae4cb7d81440150d35}} 
\index{physfs.\+h@{physfs.\+h}!P\+H\+Y\+S\+F\+S\+\_\+read\+S\+L\+E64@{P\+H\+Y\+S\+F\+S\+\_\+read\+S\+L\+E64}}
\index{P\+H\+Y\+S\+F\+S\+\_\+read\+S\+L\+E64@{P\+H\+Y\+S\+F\+S\+\_\+read\+S\+L\+E64}!physfs.\+h@{physfs.\+h}}
\subsubsection{P\+H\+Y\+S\+F\+S\+\_\+read\+S\+L\+E64()}
{\footnotesize\ttfamily int P\+H\+Y\+S\+F\+S\+\_\+read\+S\+L\+E64 (\begin{DoxyParamCaption}\item[{\textbf{ P\+H\+Y\+S\+F\+S\+\_\+\+File} $\ast$}]{file,  }\item[{\textbf{ P\+H\+Y\+S\+F\+S\+\_\+sint64} $\ast$}]{val }\end{DoxyParamCaption})}



Read and convert a signed 64-\/bit littleendian value. 

Convenience function. Read a signed 64-\/bit littleendian value from a file and convert it to the platform\textquotesingle{}s native byte order.


\begin{DoxyParams}{Parameters}
{\em file} & Physics\+FS file handle from which to read. \\
\hline
{\em val} & pointer to where value should be stored. \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
zero on failure, non-\/zero on success. If successful, ($\ast$val) will store the result. On failure, you can find out what went wrong from \doxyref{P\+H\+Y\+S\+F\+S\+\_\+get\+Last\+Error\+Code()}{p.}{physfs_8h_ae916a873aae2cf6b6e09d733cd1b3f4b}.
\end{DoxyReturn}
\begin{DoxyWarning}{Warning}
Remember, P\+H\+Y\+S\+F\+S\+\_\+sint64 is only 32 bits on platforms without any sort of 64-\/bit support. 
\end{DoxyWarning}
\mbox{\label{physfs_8h_a083c97d848b89e08f6529c31cd7dba67}} 
\index{physfs.\+h@{physfs.\+h}!P\+H\+Y\+S\+F\+S\+\_\+read\+U\+B\+E16@{P\+H\+Y\+S\+F\+S\+\_\+read\+U\+B\+E16}}
\index{P\+H\+Y\+S\+F\+S\+\_\+read\+U\+B\+E16@{P\+H\+Y\+S\+F\+S\+\_\+read\+U\+B\+E16}!physfs.\+h@{physfs.\+h}}
\subsubsection{P\+H\+Y\+S\+F\+S\+\_\+read\+U\+B\+E16()}
{\footnotesize\ttfamily int P\+H\+Y\+S\+F\+S\+\_\+read\+U\+B\+E16 (\begin{DoxyParamCaption}\item[{\textbf{ P\+H\+Y\+S\+F\+S\+\_\+\+File} $\ast$}]{file,  }\item[{\textbf{ P\+H\+Y\+S\+F\+S\+\_\+uint16} $\ast$}]{val }\end{DoxyParamCaption})}



Read and convert an unsigned 16-\/bit bigendian value. 

Convenience function. Read an unsigned 16-\/bit bigendian value from a file and convert it to the platform\textquotesingle{}s native byte order.


\begin{DoxyParams}{Parameters}
{\em file} & Physics\+FS file handle from which to read. \\
\hline
{\em val} & pointer to where value should be stored. \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
zero on failure, non-\/zero on success. If successful, ($\ast$val) will store the result. On failure, you can find out what went wrong from \doxyref{P\+H\+Y\+S\+F\+S\+\_\+get\+Last\+Error\+Code()}{p.}{physfs_8h_ae916a873aae2cf6b6e09d733cd1b3f4b}. 
\end{DoxyReturn}
\mbox{\label{physfs_8h_a357b5757a9483ef893977761d7d3fc1e}} 
\index{physfs.\+h@{physfs.\+h}!P\+H\+Y\+S\+F\+S\+\_\+read\+U\+B\+E32@{P\+H\+Y\+S\+F\+S\+\_\+read\+U\+B\+E32}}
\index{P\+H\+Y\+S\+F\+S\+\_\+read\+U\+B\+E32@{P\+H\+Y\+S\+F\+S\+\_\+read\+U\+B\+E32}!physfs.\+h@{physfs.\+h}}
\subsubsection{P\+H\+Y\+S\+F\+S\+\_\+read\+U\+B\+E32()}
{\footnotesize\ttfamily int P\+H\+Y\+S\+F\+S\+\_\+read\+U\+B\+E32 (\begin{DoxyParamCaption}\item[{\textbf{ P\+H\+Y\+S\+F\+S\+\_\+\+File} $\ast$}]{file,  }\item[{\textbf{ P\+H\+Y\+S\+F\+S\+\_\+uint32} $\ast$}]{val }\end{DoxyParamCaption})}



Read and convert an unsigned 32-\/bit bigendian value. 

Convenience function. Read an unsigned 32-\/bit bigendian value from a file and convert it to the platform\textquotesingle{}s native byte order.


\begin{DoxyParams}{Parameters}
{\em file} & Physics\+FS file handle from which to read. \\
\hline
{\em val} & pointer to where value should be stored. \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
zero on failure, non-\/zero on success. If successful, ($\ast$val) will store the result. On failure, you can find out what went wrong from \doxyref{P\+H\+Y\+S\+F\+S\+\_\+get\+Last\+Error\+Code()}{p.}{physfs_8h_ae916a873aae2cf6b6e09d733cd1b3f4b}. 
\end{DoxyReturn}
\mbox{\label{physfs_8h_a380430eda70acd8728930a2f1256c071}} 
\index{physfs.\+h@{physfs.\+h}!P\+H\+Y\+S\+F\+S\+\_\+read\+U\+B\+E64@{P\+H\+Y\+S\+F\+S\+\_\+read\+U\+B\+E64}}
\index{P\+H\+Y\+S\+F\+S\+\_\+read\+U\+B\+E64@{P\+H\+Y\+S\+F\+S\+\_\+read\+U\+B\+E64}!physfs.\+h@{physfs.\+h}}
\subsubsection{P\+H\+Y\+S\+F\+S\+\_\+read\+U\+B\+E64()}
{\footnotesize\ttfamily int P\+H\+Y\+S\+F\+S\+\_\+read\+U\+B\+E64 (\begin{DoxyParamCaption}\item[{\textbf{ P\+H\+Y\+S\+F\+S\+\_\+\+File} $\ast$}]{file,  }\item[{\textbf{ P\+H\+Y\+S\+F\+S\+\_\+uint64} $\ast$}]{val }\end{DoxyParamCaption})}



Read and convert an unsigned 64-\/bit bigendian value. 

Convenience function. Read an unsigned 64-\/bit bigendian value from a file and convert it to the platform\textquotesingle{}s native byte order.


\begin{DoxyParams}{Parameters}
{\em file} & Physics\+FS file handle from which to read. \\
\hline
{\em val} & pointer to where value should be stored. \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
zero on failure, non-\/zero on success. If successful, ($\ast$val) will store the result. On failure, you can find out what went wrong from \doxyref{P\+H\+Y\+S\+F\+S\+\_\+get\+Last\+Error\+Code()}{p.}{physfs_8h_ae916a873aae2cf6b6e09d733cd1b3f4b}.
\end{DoxyReturn}
\begin{DoxyWarning}{Warning}
Remember, P\+H\+Y\+S\+F\+S\+\_\+uint64 is only 32 bits on platforms without any sort of 64-\/bit support. 
\end{DoxyWarning}
\mbox{\label{physfs_8h_af13248f4af186eda3983831dd8632da1}} 
\index{physfs.\+h@{physfs.\+h}!P\+H\+Y\+S\+F\+S\+\_\+read\+U\+L\+E16@{P\+H\+Y\+S\+F\+S\+\_\+read\+U\+L\+E16}}
\index{P\+H\+Y\+S\+F\+S\+\_\+read\+U\+L\+E16@{P\+H\+Y\+S\+F\+S\+\_\+read\+U\+L\+E16}!physfs.\+h@{physfs.\+h}}
\subsubsection{P\+H\+Y\+S\+F\+S\+\_\+read\+U\+L\+E16()}
{\footnotesize\ttfamily int P\+H\+Y\+S\+F\+S\+\_\+read\+U\+L\+E16 (\begin{DoxyParamCaption}\item[{\textbf{ P\+H\+Y\+S\+F\+S\+\_\+\+File} $\ast$}]{file,  }\item[{\textbf{ P\+H\+Y\+S\+F\+S\+\_\+uint16} $\ast$}]{val }\end{DoxyParamCaption})}



Read and convert an unsigned 16-\/bit littleendian value. 

Convenience function. Read an unsigned 16-\/bit littleendian value from a file and convert it to the platform\textquotesingle{}s native byte order.


\begin{DoxyParams}{Parameters}
{\em file} & Physics\+FS file handle from which to read. \\
\hline
{\em val} & pointer to where value should be stored. \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
zero on failure, non-\/zero on success. If successful, ($\ast$val) will store the result. On failure, you can find out what went wrong from \doxyref{P\+H\+Y\+S\+F\+S\+\_\+get\+Last\+Error\+Code()}{p.}{physfs_8h_ae916a873aae2cf6b6e09d733cd1b3f4b}. 
\end{DoxyReturn}
\mbox{\label{physfs_8h_adef7cf2fb6311b0bc9d39634b4088545}} 
\index{physfs.\+h@{physfs.\+h}!P\+H\+Y\+S\+F\+S\+\_\+read\+U\+L\+E32@{P\+H\+Y\+S\+F\+S\+\_\+read\+U\+L\+E32}}
\index{P\+H\+Y\+S\+F\+S\+\_\+read\+U\+L\+E32@{P\+H\+Y\+S\+F\+S\+\_\+read\+U\+L\+E32}!physfs.\+h@{physfs.\+h}}
\subsubsection{P\+H\+Y\+S\+F\+S\+\_\+read\+U\+L\+E32()}
{\footnotesize\ttfamily int P\+H\+Y\+S\+F\+S\+\_\+read\+U\+L\+E32 (\begin{DoxyParamCaption}\item[{\textbf{ P\+H\+Y\+S\+F\+S\+\_\+\+File} $\ast$}]{file,  }\item[{\textbf{ P\+H\+Y\+S\+F\+S\+\_\+uint32} $\ast$}]{val }\end{DoxyParamCaption})}



Read and convert an unsigned 32-\/bit littleendian value. 

Convenience function. Read an unsigned 32-\/bit littleendian value from a file and convert it to the platform\textquotesingle{}s native byte order.


\begin{DoxyParams}{Parameters}
{\em file} & Physics\+FS file handle from which to read. \\
\hline
{\em val} & pointer to where value should be stored. \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
zero on failure, non-\/zero on success. If successful, ($\ast$val) will store the result. On failure, you can find out what went wrong from \doxyref{P\+H\+Y\+S\+F\+S\+\_\+get\+Last\+Error\+Code()}{p.}{physfs_8h_ae916a873aae2cf6b6e09d733cd1b3f4b}. 
\end{DoxyReturn}
\mbox{\label{physfs_8h_ae72ad9e14404add23d432838f4e9f35a}} 
\index{physfs.\+h@{physfs.\+h}!P\+H\+Y\+S\+F\+S\+\_\+read\+U\+L\+E64@{P\+H\+Y\+S\+F\+S\+\_\+read\+U\+L\+E64}}
\index{P\+H\+Y\+S\+F\+S\+\_\+read\+U\+L\+E64@{P\+H\+Y\+S\+F\+S\+\_\+read\+U\+L\+E64}!physfs.\+h@{physfs.\+h}}
\subsubsection{P\+H\+Y\+S\+F\+S\+\_\+read\+U\+L\+E64()}
{\footnotesize\ttfamily int P\+H\+Y\+S\+F\+S\+\_\+read\+U\+L\+E64 (\begin{DoxyParamCaption}\item[{\textbf{ P\+H\+Y\+S\+F\+S\+\_\+\+File} $\ast$}]{file,  }\item[{\textbf{ P\+H\+Y\+S\+F\+S\+\_\+uint64} $\ast$}]{val }\end{DoxyParamCaption})}



Read and convert an unsigned 64-\/bit littleendian value. 

Convenience function. Read an unsigned 64-\/bit littleendian value from a file and convert it to the platform\textquotesingle{}s native byte order.


\begin{DoxyParams}{Parameters}
{\em file} & Physics\+FS file handle from which to read. \\
\hline
{\em val} & pointer to where value should be stored. \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
zero on failure, non-\/zero on success. If successful, ($\ast$val) will store the result. On failure, you can find out what went wrong from \doxyref{P\+H\+Y\+S\+F\+S\+\_\+get\+Last\+Error\+Code()}{p.}{physfs_8h_ae916a873aae2cf6b6e09d733cd1b3f4b}.
\end{DoxyReturn}
\begin{DoxyWarning}{Warning}
Remember, P\+H\+Y\+S\+F\+S\+\_\+uint64 is only 32 bits on platforms without any sort of 64-\/bit support. 
\end{DoxyWarning}
\mbox{\label{physfs_8h_ace0ecda857dc622e2d005af02972237d}} 
\index{physfs.\+h@{physfs.\+h}!P\+H\+Y\+S\+F\+S\+\_\+register\+Archiver@{P\+H\+Y\+S\+F\+S\+\_\+register\+Archiver}}
\index{P\+H\+Y\+S\+F\+S\+\_\+register\+Archiver@{P\+H\+Y\+S\+F\+S\+\_\+register\+Archiver}!physfs.\+h@{physfs.\+h}}
\subsubsection{P\+H\+Y\+S\+F\+S\+\_\+register\+Archiver()}
{\footnotesize\ttfamily int P\+H\+Y\+S\+F\+S\+\_\+register\+Archiver (\begin{DoxyParamCaption}\item[{const \textbf{ P\+H\+Y\+S\+F\+S\+\_\+\+Archiver} $\ast$}]{archiver }\end{DoxyParamCaption})}



Add a new archiver to the system. 

\begin{DoxyWarning}{Warning}
This is advanced, hardcore stuff. You don\textquotesingle{}t need this unless you really know what you\textquotesingle{}re doing. Most apps will not need this.
\end{DoxyWarning}
If you want to provide your own archiver (for example, a custom archive file format, or some virtual thing you want to make look like a filesystem that you can access through the usual Physics\+FS A\+P\+Is), this is where you start. Once an archiver is successfully registered, then you can use \doxyref{P\+H\+Y\+S\+F\+S\+\_\+mount()}{p.}{physfs_8h_a8eb320e9af03dcdb4c05bbff3ea604d4} to add archives that your archiver supports to the search path, or perhaps use it as the write dir. Internally, Physics\+FS uses this function to register its own built-\/in archivers, like .zip support, etc.

You may not have two archivers that handle the same extension. If you are going to have a clash, you can deregister the other archiver (including built-\/in ones) with \doxyref{P\+H\+Y\+S\+F\+S\+\_\+deregister\+Archiver()}{p.}{physfs_8h_abbc7cce9112c5ddc2f3a9ad5d0edf6e0}.

The data in (archiver) is copied; you may free this pointer when this function returns.

Once this function returns successfully, Physics\+FS will be able to support archives of this type until you deregister the archiver again.


\begin{DoxyParams}{Parameters}
{\em archiver} & The archiver to register. \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
Zero on error, non-\/zero on success.
\end{DoxyReturn}
\begin{DoxySeeAlso}{See also}
\doxyref{P\+H\+Y\+S\+F\+S\+\_\+\+Archiver}{p.}{structPHYSFS__Archiver} 

\doxyref{P\+H\+Y\+S\+F\+S\+\_\+deregister\+Archiver}{p.}{physfs_8h_abbc7cce9112c5ddc2f3a9ad5d0edf6e0} 
\end{DoxySeeAlso}
\mbox{\label{physfs_8h_a1e4ed59d6c80b8fb28904723cfd5b510}} 
\index{physfs.\+h@{physfs.\+h}!P\+H\+Y\+S\+F\+S\+\_\+remove\+From\+Search\+Path@{P\+H\+Y\+S\+F\+S\+\_\+remove\+From\+Search\+Path}}
\index{P\+H\+Y\+S\+F\+S\+\_\+remove\+From\+Search\+Path@{P\+H\+Y\+S\+F\+S\+\_\+remove\+From\+Search\+Path}!physfs.\+h@{physfs.\+h}}
\subsubsection{P\+H\+Y\+S\+F\+S\+\_\+remove\+From\+Search\+Path()}
{\footnotesize\ttfamily int P\+H\+Y\+S\+F\+S\+\_\+remove\+From\+Search\+Path (\begin{DoxyParamCaption}\item[{const char $\ast$}]{old\+Dir }\end{DoxyParamCaption})}



Remove a directory or archive from the search path. 

\begin{DoxyRefDesc}{Deprecated}
\item[\textbf{ Deprecated}]As of Physics\+FS 2.\+1, use \doxyref{P\+H\+Y\+S\+F\+S\+\_\+unmount()}{p.}{physfs_8h_aab0e2ba90aa918b2ee1ed7c40293b442} instead. This function just wraps it anyhow. There\textquotesingle{}s no functional difference except the vocabulary changed from \char`\"{}adding to the search path\char`\"{} to \char`\"{}mounting\char`\"{} when that functionality was extended, and thus the preferred way to accomplish this function\textquotesingle{}s work is now called \char`\"{}unmounting.\char`\"{}\end{DoxyRefDesc}


This function is equivalent to\+:


\begin{DoxyCode}
PHYSFS_unmount(oldDir);
\end{DoxyCode}


You must use this and not P\+H\+Y\+S\+F\+S\+\_\+unmount if binary compatibility with Physics\+FS 1.\+0 is important (which it may not be for many people).

\begin{DoxySeeAlso}{See also}
\doxyref{P\+H\+Y\+S\+F\+S\+\_\+add\+To\+Search\+Path}{p.}{physfs_8h_a0956d926822291a23ee540c2ffefa1af} 

\doxyref{P\+H\+Y\+S\+F\+S\+\_\+get\+Search\+Path}{p.}{physfs_8h_ac738531e9c7e5ca3797b64985c103cf4} 

\doxyref{P\+H\+Y\+S\+F\+S\+\_\+unmount}{p.}{physfs_8h_aab0e2ba90aa918b2ee1ed7c40293b442} 
\end{DoxySeeAlso}
\mbox{\label{physfs_8h_ae562b45b1e1b02505ce1d82ad785f04a}} 
\index{physfs.\+h@{physfs.\+h}!P\+H\+Y\+S\+F\+S\+\_\+seek@{P\+H\+Y\+S\+F\+S\+\_\+seek}}
\index{P\+H\+Y\+S\+F\+S\+\_\+seek@{P\+H\+Y\+S\+F\+S\+\_\+seek}!physfs.\+h@{physfs.\+h}}
\subsubsection{P\+H\+Y\+S\+F\+S\+\_\+seek()}
{\footnotesize\ttfamily int P\+H\+Y\+S\+F\+S\+\_\+seek (\begin{DoxyParamCaption}\item[{\textbf{ P\+H\+Y\+S\+F\+S\+\_\+\+File} $\ast$}]{handle,  }\item[{\textbf{ P\+H\+Y\+S\+F\+S\+\_\+uint64}}]{pos }\end{DoxyParamCaption})}



Seek to a new position within a Physics\+FS filehandle. 

The next read or write will occur at that place. Seeking past the beginning or end of the file is not allowed, and causes an error.


\begin{DoxyParams}{Parameters}
{\em handle} & handle returned from P\+H\+Y\+S\+F\+S\+\_\+open$\ast$(). \\
\hline
{\em pos} & number of bytes from start of file to seek to. \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
nonzero on success, zero on error. Use \doxyref{P\+H\+Y\+S\+F\+S\+\_\+get\+Last\+Error\+Code()}{p.}{physfs_8h_ae916a873aae2cf6b6e09d733cd1b3f4b} to obtain the specific error.
\end{DoxyReturn}
\begin{DoxySeeAlso}{See also}
\doxyref{P\+H\+Y\+S\+F\+S\+\_\+tell}{p.}{physfs_8h_a0d481bdd4cf32ed1a41540ee59840c24} 
\end{DoxySeeAlso}
\mbox{\label{physfs_8h_ae6297d1ae7755b9236b01950bfbb0ef1}} 
\index{physfs.\+h@{physfs.\+h}!P\+H\+Y\+S\+F\+S\+\_\+set\+Allocator@{P\+H\+Y\+S\+F\+S\+\_\+set\+Allocator}}
\index{P\+H\+Y\+S\+F\+S\+\_\+set\+Allocator@{P\+H\+Y\+S\+F\+S\+\_\+set\+Allocator}!physfs.\+h@{physfs.\+h}}
\subsubsection{P\+H\+Y\+S\+F\+S\+\_\+set\+Allocator()}
{\footnotesize\ttfamily int P\+H\+Y\+S\+F\+S\+\_\+set\+Allocator (\begin{DoxyParamCaption}\item[{const \textbf{ P\+H\+Y\+S\+F\+S\+\_\+\+Allocator} $\ast$}]{allocator }\end{DoxyParamCaption})}



Hook your own allocation routines into Physics\+FS. 

(This is for limited, hardcore use. If you don\textquotesingle{}t immediately see a need for it, you can probably ignore this forever.)

By default, Physics\+FS will use whatever is reasonable for a platform to manage dynamic memory (usually A\+N\+SI C malloc/realloc/free, but some platforms might use something else), but in some uncommon cases, the app might want more control over the library\textquotesingle{}s memory management. This lets you redirect Physics\+FS to use your own allocation routines instead. You can only call this function before \doxyref{P\+H\+Y\+S\+F\+S\+\_\+init()}{p.}{physfs_8h_a61b94cac8e65267afb8a5f2344e60dd1}; if the library is initialized, it\textquotesingle{}ll reject your efforts to change the allocator mid-\/stream. You may call this function after \doxyref{P\+H\+Y\+S\+F\+S\+\_\+deinit()}{p.}{physfs_8h_aa465c9b58e5020f503085d433a413b5b} if you are willing to shut down the library and restart it with a new allocator; this is a safe and supported operation. The allocator remains intact between deinit/init calls. If you want to return to the platform\textquotesingle{}s default allocator, pass a N\+U\+LL in here.

If you aren\textquotesingle{}t immediately sure what to do with this function, you can safely ignore it altogether.


\begin{DoxyParams}{Parameters}
{\em allocator} & Structure containing your allocator\textquotesingle{}s entry points. \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
zero on failure, non-\/zero on success. This call only fails when used between \doxyref{P\+H\+Y\+S\+F\+S\+\_\+init()}{p.}{physfs_8h_a61b94cac8e65267afb8a5f2344e60dd1} and \doxyref{P\+H\+Y\+S\+F\+S\+\_\+deinit()}{p.}{physfs_8h_aa465c9b58e5020f503085d433a413b5b} calls. 
\end{DoxyReturn}
\mbox{\label{physfs_8h_aede5de47197e1a613d2091802befc886}} 
\index{physfs.\+h@{physfs.\+h}!P\+H\+Y\+S\+F\+S\+\_\+set\+Buffer@{P\+H\+Y\+S\+F\+S\+\_\+set\+Buffer}}
\index{P\+H\+Y\+S\+F\+S\+\_\+set\+Buffer@{P\+H\+Y\+S\+F\+S\+\_\+set\+Buffer}!physfs.\+h@{physfs.\+h}}
\subsubsection{P\+H\+Y\+S\+F\+S\+\_\+set\+Buffer()}
{\footnotesize\ttfamily int P\+H\+Y\+S\+F\+S\+\_\+set\+Buffer (\begin{DoxyParamCaption}\item[{\textbf{ P\+H\+Y\+S\+F\+S\+\_\+\+File} $\ast$}]{handle,  }\item[{\textbf{ P\+H\+Y\+S\+F\+S\+\_\+uint64}}]{bufsize }\end{DoxyParamCaption})}



Set up buffering for a Physics\+FS file handle. 

Define an i/o buffer for a file handle. A memory block of (bufsize) bytes will be allocated and associated with (handle).

For files opened for reading, up to (bufsize) bytes are read from (handle) and stored in the internal buffer. Calls to \doxyref{P\+H\+Y\+S\+F\+S\+\_\+read()}{p.}{physfs_8h_a91234f576477f7de67d635761d01aa7b} will pull from this buffer until it is empty, and then refill it for more reading. Note that compressed files, like Z\+IP archives, will decompress while buffering, so this can be handy for offsetting C\+P\+U-\/intensive operations. The buffer isn\textquotesingle{}t filled until you do your next read.

For files opened for writing, data will be buffered to memory until the buffer is full or the buffer is flushed. Closing a handle implicitly causes a flush...check your return values!

Seeking, etc transparently accounts for buffering.

You can resize an existing buffer by calling this function more than once on the same file. Setting the buffer size to zero will free an existing buffer.

Physics\+FS file handles are unbuffered by default.

Please check the return value of this function! Failures can include not being able to seek backwards in a read-\/only file when removing the buffer, not being able to allocate the buffer, and not being able to flush the buffer to disk, among other unexpected problems.


\begin{DoxyParams}{Parameters}
{\em handle} & handle returned from P\+H\+Y\+S\+F\+S\+\_\+open$\ast$(). \\
\hline
{\em bufsize} & size, in bytes, of buffer to allocate. \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
nonzero if successful, zero on error.
\end{DoxyReturn}
\begin{DoxySeeAlso}{See also}
\doxyref{P\+H\+Y\+S\+F\+S\+\_\+flush}{p.}{physfs_8h_a3fd8f9cfdfd09f4fb778a386d8e97e8a} 

\doxyref{P\+H\+Y\+S\+F\+S\+\_\+read}{p.}{physfs_8h_a91234f576477f7de67d635761d01aa7b} 

\doxyref{P\+H\+Y\+S\+F\+S\+\_\+write}{p.}{physfs_8h_af5dc83d5e4ef0b0c9bce1834ea1bb498} 

\doxyref{P\+H\+Y\+S\+F\+S\+\_\+close}{p.}{physfs_8h_a6822f8ff10073e855a1c3a6485b882f2} 
\end{DoxySeeAlso}
\mbox{\label{physfs_8h_ade2c854542c68abc2015649fadd3a623}} 
\index{physfs.\+h@{physfs.\+h}!P\+H\+Y\+S\+F\+S\+\_\+set\+Error\+Code@{P\+H\+Y\+S\+F\+S\+\_\+set\+Error\+Code}}
\index{P\+H\+Y\+S\+F\+S\+\_\+set\+Error\+Code@{P\+H\+Y\+S\+F\+S\+\_\+set\+Error\+Code}!physfs.\+h@{physfs.\+h}}
\subsubsection{P\+H\+Y\+S\+F\+S\+\_\+set\+Error\+Code()}
{\footnotesize\ttfamily void P\+H\+Y\+S\+F\+S\+\_\+set\+Error\+Code (\begin{DoxyParamCaption}\item[{\textbf{ P\+H\+Y\+S\+F\+S\+\_\+\+Error\+Code}}]{code }\end{DoxyParamCaption})}



Set the current thread\textquotesingle{}s error code. 

This lets you set the value that will be returned by the next call to \doxyref{P\+H\+Y\+S\+F\+S\+\_\+get\+Last\+Error\+Code()}{p.}{physfs_8h_ae916a873aae2cf6b6e09d733cd1b3f4b}. This will replace any existing error code, whether set by your application or internally by Physics\+FS.

Error codes are stored per-\/thread; what you set here will not be accessible to another thread.

Any call into Physics\+FS may change the current error code, so any code you set here is somewhat fragile, and thus you shouldn\textquotesingle{}t build any serious error reporting framework on this function. The primary goal of this function is to allow \doxyref{P\+H\+Y\+S\+F\+S\+\_\+\+Io}{p.}{structPHYSFS__Io} implementations to set the error state, which generally will be passed back to your application when Physics\+FS makes a \doxyref{P\+H\+Y\+S\+F\+S\+\_\+\+Io}{p.}{structPHYSFS__Io} call that fails internally.

This function doesn\textquotesingle{}t care if the error code is a value known to Physics\+FS or not (but \doxyref{P\+H\+Y\+S\+F\+S\+\_\+get\+Error\+By\+Code()}{p.}{physfs_8h_a545f6b5ba97faa19441932dffb65c3be} will return N\+U\+LL for unknown values). The value will be reported unmolested by \doxyref{P\+H\+Y\+S\+F\+S\+\_\+get\+Last\+Error\+Code()}{p.}{physfs_8h_ae916a873aae2cf6b6e09d733cd1b3f4b}.


\begin{DoxyParams}{Parameters}
{\em code} & Error code to become the current thread\textquotesingle{}s new error state.\\
\hline
\end{DoxyParams}
\begin{DoxySeeAlso}{See also}
\doxyref{P\+H\+Y\+S\+F\+S\+\_\+get\+Last\+Error\+Code}{p.}{physfs_8h_ae916a873aae2cf6b6e09d733cd1b3f4b} 

\doxyref{P\+H\+Y\+S\+F\+S\+\_\+get\+Error\+By\+Code}{p.}{physfs_8h_a545f6b5ba97faa19441932dffb65c3be} 
\end{DoxySeeAlso}
\mbox{\label{physfs_8h_afef8700f714b6800ff688372c540bfe2}} 
\index{physfs.\+h@{physfs.\+h}!P\+H\+Y\+S\+F\+S\+\_\+set\+Sane\+Config@{P\+H\+Y\+S\+F\+S\+\_\+set\+Sane\+Config}}
\index{P\+H\+Y\+S\+F\+S\+\_\+set\+Sane\+Config@{P\+H\+Y\+S\+F\+S\+\_\+set\+Sane\+Config}!physfs.\+h@{physfs.\+h}}
\subsubsection{P\+H\+Y\+S\+F\+S\+\_\+set\+Sane\+Config()}
{\footnotesize\ttfamily int P\+H\+Y\+S\+F\+S\+\_\+set\+Sane\+Config (\begin{DoxyParamCaption}\item[{const char $\ast$}]{organization,  }\item[{const char $\ast$}]{app\+Name,  }\item[{const char $\ast$}]{archive\+Ext,  }\item[{int}]{include\+Cd\+Roms,  }\item[{int}]{archives\+First }\end{DoxyParamCaption})}



Set up sane, default paths. 

Helper function.

The write dir will be set to the pref dir returned by 
\begin{DoxyCode}
PHYSFS_getPrefDir(organization, appName) 
\end{DoxyCode}
, which is created if it doesn\textquotesingle{}t exist.

The above is sufficient to make sure your program\textquotesingle{}s configuration directory is separated from other clutter, and platform-\/independent.

The search path will be\+:


\begin{DoxyItemize}
\item The Write Dir (created if it doesn\textquotesingle{}t exist)
\item The Base Dir (\doxyref{P\+H\+Y\+S\+F\+S\+\_\+get\+Base\+Dir()}{p.}{physfs_8h_a0034c327dfb381a1c95deb80878bcede})
\item All found C\+D-\/\+R\+OM dirs (optionally)
\end{DoxyItemize}

These directories are then searched for files ending with the extension (archive\+Ext), which, if they are valid and supported archives, will also be added to the search path. If you specified \char`\"{}\+P\+K\+G\char`\"{} for (archive\+Ext), and there\textquotesingle{}s a file named data.\+P\+KG in the base dir, it\textquotesingle{}ll be checked. Archives can either be appended or prepended to the search path in alphabetical order, regardless of which directories they were found in. All archives are mounted in the root of the virtual file system (\char`\"{}/\char`\"{}).

All of this can be accomplished from the application, but this just does it all for you. Feel free to add more to the search path manually, too.


\begin{DoxyParams}{Parameters}
{\em organization} & Name of your company/group/etc to be used as a dirname, so keep it small, and no-\/frills.\\
\hline
{\em app\+Name} & Program-\/specific name of your program, to separate it from other programs using Physics\+FS.\\
\hline
{\em archive\+Ext} & File extension used by your program to specify an archive. For example, Quake 3 uses \char`\"{}pk3\char`\"{}, even though they are just zipfiles. Specify N\+U\+LL to not dig out archives automatically. Do not specify the \textquotesingle{}.\textquotesingle{} char; If you want to look for Z\+IP files, specify \char`\"{}\+Z\+I\+P\char`\"{} and not \char`\"{}.\+Z\+I\+P\char`\"{} ... the archive search is case-\/insensitive.\\
\hline
{\em include\+Cd\+Roms} & Non-\/zero to include C\+D-\/\+R\+O\+Ms in the search path, and (if (archive\+Ext) != N\+U\+LL) search them for archives. This may cause a significant amount of blocking while discs are accessed, and if there are no discs in the drive (or even not mounted on Unix systems), then they may not be made available anyhow. You may want to specify zero and handle the disc setup yourself.\\
\hline
{\em archives\+First} & Non-\/zero to prepend the archives to the search path. Zero to append them. Ignored if !(archive\+Ext).\\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
nonzero on success, zero on error. Use \doxyref{P\+H\+Y\+S\+F\+S\+\_\+get\+Last\+Error\+Code()}{p.}{physfs_8h_ae916a873aae2cf6b6e09d733cd1b3f4b} to obtain the specific error. 
\end{DoxyReturn}
\mbox{\label{physfs_8h_a36c408d40b3a93c8f9fc02a16c02e430}} 
\index{physfs.\+h@{physfs.\+h}!P\+H\+Y\+S\+F\+S\+\_\+set\+Write\+Dir@{P\+H\+Y\+S\+F\+S\+\_\+set\+Write\+Dir}}
\index{P\+H\+Y\+S\+F\+S\+\_\+set\+Write\+Dir@{P\+H\+Y\+S\+F\+S\+\_\+set\+Write\+Dir}!physfs.\+h@{physfs.\+h}}
\subsubsection{P\+H\+Y\+S\+F\+S\+\_\+set\+Write\+Dir()}
{\footnotesize\ttfamily int P\+H\+Y\+S\+F\+S\+\_\+set\+Write\+Dir (\begin{DoxyParamCaption}\item[{const char $\ast$}]{new\+Dir }\end{DoxyParamCaption})}



Tell Physics\+FS 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.


\begin{DoxyParams}{Parameters}
{\em new\+Dir} & The new directory to be the root of the write dir, specified in platform-\/dependent notation. Setting to N\+U\+LL disables the write dir, so no files can be opened for writing via Physics\+FS. \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
non-\/zero on success, zero on failure. All attempts to open a file for writing via Physics\+FS will fail until this call succeeds. Use \doxyref{P\+H\+Y\+S\+F\+S\+\_\+get\+Last\+Error\+Code()}{p.}{physfs_8h_ae916a873aae2cf6b6e09d733cd1b3f4b} to obtain the specific error.
\end{DoxyReturn}
\begin{DoxySeeAlso}{See also}
\doxyref{P\+H\+Y\+S\+F\+S\+\_\+get\+Write\+Dir}{p.}{physfs_8h_a6533ff91180a4c8abfe24d458f6b9915} 
\end{DoxySeeAlso}
\mbox{\label{physfs_8h_a7f5e23675c50ffe51ad00cceb5a65348}} 
\index{physfs.\+h@{physfs.\+h}!P\+H\+Y\+S\+F\+S\+\_\+stat@{P\+H\+Y\+S\+F\+S\+\_\+stat}}
\index{P\+H\+Y\+S\+F\+S\+\_\+stat@{P\+H\+Y\+S\+F\+S\+\_\+stat}!physfs.\+h@{physfs.\+h}}
\subsubsection{P\+H\+Y\+S\+F\+S\+\_\+stat()}
{\footnotesize\ttfamily int P\+H\+Y\+S\+F\+S\+\_\+stat (\begin{DoxyParamCaption}\item[{const char $\ast$}]{fname,  }\item[{\textbf{ P\+H\+Y\+S\+F\+S\+\_\+\+Stat} $\ast$}]{stat }\end{DoxyParamCaption})}



Get various information about a directory or a file. 

Obtain various information about a file or directory from the meta data.

This function will never follow symbolic links. If you haven\textquotesingle{}t enabled symlinks with \doxyref{P\+H\+Y\+S\+F\+S\+\_\+permit\+Symbolic\+Links()}{p.}{physfs_8h_aad451d9b3f46f627a1be8caee2eef9b7}, stat\textquotesingle{}ing a symlink will be treated like stat\textquotesingle{}ing a non-\/existant file. If symlinks are enabled, stat\textquotesingle{}ing a symlink will give you information on the link itself and not what it points to.


\begin{DoxyParams}{Parameters}
{\em fname} & filename to check, in platform-\/indepedent notation. \\
\hline
{\em stat} & pointer to structure to fill in with data about (fname). \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
non-\/zero on success, zero on failure. On failure, (stat)\textquotesingle{}s contents are undefined.
\end{DoxyReturn}
\begin{DoxySeeAlso}{See also}
\doxyref{P\+H\+Y\+S\+F\+S\+\_\+\+Stat}{p.}{structPHYSFS__Stat} 
\end{DoxySeeAlso}
\mbox{\label{physfs_8h_a4ca65fbaa485d68113912bbbd70bd19e}} 
\index{physfs.\+h@{physfs.\+h}!P\+H\+Y\+S\+F\+S\+\_\+supported\+Archive\+Types@{P\+H\+Y\+S\+F\+S\+\_\+supported\+Archive\+Types}}
\index{P\+H\+Y\+S\+F\+S\+\_\+supported\+Archive\+Types@{P\+H\+Y\+S\+F\+S\+\_\+supported\+Archive\+Types}!physfs.\+h@{physfs.\+h}}
\subsubsection{P\+H\+Y\+S\+F\+S\+\_\+supported\+Archive\+Types()}
{\footnotesize\ttfamily const \textbf{ P\+H\+Y\+S\+F\+S\+\_\+\+Archive\+Info} $\ast$$\ast$ P\+H\+Y\+S\+F\+S\+\_\+supported\+Archive\+Types (\begin{DoxyParamCaption}\item[{void}]{ }\end{DoxyParamCaption})}



Get a list of supported archive types. 

Get a list of archive types supported by this implementation of Physic\+FS. These are the file formats usable for search path entries. This is for informational purposes only. Note that the extension listed is merely convention\+: if we list \char`\"{}\+Z\+I\+P\char`\"{}, you can open a Pk\+Zip-\/compatible archive with an extension of \char`\"{}\+X\+Y\+Z\char`\"{}, if you like.

The returned value is an array of pointers to \doxyref{P\+H\+Y\+S\+F\+S\+\_\+\+Archive\+Info}{p.}{structPHYSFS__ArchiveInfo} structures, with a N\+U\+LL entry to signify the end of the list\+:


\begin{DoxyCode}
PHYSFS_ArchiveInfo **i;

\textcolor{keywordflow}{for} (i = PHYSFS_supportedArchiveTypes(); *i != NULL; i++)
\{
    printf(\textcolor{stringliteral}{"Supported archive: [%s], which is [%s].\(\backslash\)n"},
             (*i)->extension, (*i)->description);
\}
\end{DoxyCode}


The return values are pointers to internal memory, and should be considered R\+E\+AD O\+N\+LY, and never freed. The returned values are valid until the next call to \doxyref{P\+H\+Y\+S\+F\+S\+\_\+deinit()}{p.}{physfs_8h_aa465c9b58e5020f503085d433a413b5b}, \doxyref{P\+H\+Y\+S\+F\+S\+\_\+register\+Archiver()}{p.}{physfs_8h_ace0ecda857dc622e2d005af02972237d}, or \doxyref{P\+H\+Y\+S\+F\+S\+\_\+deregister\+Archiver()}{p.}{physfs_8h_abbc7cce9112c5ddc2f3a9ad5d0edf6e0}.

\begin{DoxyReturn}{Returns}
R\+E\+AD O\+N\+LY Null-\/terminated array of R\+E\+AD O\+N\+LY structures.
\end{DoxyReturn}
\begin{DoxySeeAlso}{See also}
\doxyref{P\+H\+Y\+S\+F\+S\+\_\+register\+Archiver}{p.}{physfs_8h_ace0ecda857dc622e2d005af02972237d} 

\doxyref{P\+H\+Y\+S\+F\+S\+\_\+deregister\+Archiver}{p.}{physfs_8h_abbc7cce9112c5ddc2f3a9ad5d0edf6e0} 
\end{DoxySeeAlso}
\mbox{\label{physfs_8h_a5fc8e4b9696316e25e3f6422910726c6}} 
\index{physfs.\+h@{physfs.\+h}!P\+H\+Y\+S\+F\+S\+\_\+swap\+S\+B\+E16@{P\+H\+Y\+S\+F\+S\+\_\+swap\+S\+B\+E16}}
\index{P\+H\+Y\+S\+F\+S\+\_\+swap\+S\+B\+E16@{P\+H\+Y\+S\+F\+S\+\_\+swap\+S\+B\+E16}!physfs.\+h@{physfs.\+h}}
\subsubsection{P\+H\+Y\+S\+F\+S\+\_\+swap\+S\+B\+E16()}
{\footnotesize\ttfamily \textbf{ P\+H\+Y\+S\+F\+S\+\_\+sint16} P\+H\+Y\+S\+F\+S\+\_\+swap\+S\+B\+E16 (\begin{DoxyParamCaption}\item[{\textbf{ P\+H\+Y\+S\+F\+S\+\_\+sint16}}]{val }\end{DoxyParamCaption})}



Swap bigendian signed 16 to platform\textquotesingle{}s native byte order. 

Take a 16-\/bit signed value in bigendian format and convert it to the platform\textquotesingle{}s native byte order.


\begin{DoxyParams}{Parameters}
{\em val} & value to convert \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
converted value. 
\end{DoxyReturn}
\mbox{\label{physfs_8h_a8908fb655aa60f0feb2f1662c93c8a0e}} 
\index{physfs.\+h@{physfs.\+h}!P\+H\+Y\+S\+F\+S\+\_\+swap\+S\+B\+E32@{P\+H\+Y\+S\+F\+S\+\_\+swap\+S\+B\+E32}}
\index{P\+H\+Y\+S\+F\+S\+\_\+swap\+S\+B\+E32@{P\+H\+Y\+S\+F\+S\+\_\+swap\+S\+B\+E32}!physfs.\+h@{physfs.\+h}}
\subsubsection{P\+H\+Y\+S\+F\+S\+\_\+swap\+S\+B\+E32()}
{\footnotesize\ttfamily \textbf{ P\+H\+Y\+S\+F\+S\+\_\+sint32} P\+H\+Y\+S\+F\+S\+\_\+swap\+S\+B\+E32 (\begin{DoxyParamCaption}\item[{\textbf{ P\+H\+Y\+S\+F\+S\+\_\+sint32}}]{val }\end{DoxyParamCaption})}



Swap bigendian signed 32 to platform\textquotesingle{}s native byte order. 

Take a 32-\/bit signed value in bigendian format and convert it to the platform\textquotesingle{}s native byte order.


\begin{DoxyParams}{Parameters}
{\em val} & value to convert \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
converted value. 
\end{DoxyReturn}
\mbox{\label{physfs_8h_a974af7dedc1125735efd9b14e23f20e6}} 
\index{physfs.\+h@{physfs.\+h}!P\+H\+Y\+S\+F\+S\+\_\+swap\+S\+B\+E64@{P\+H\+Y\+S\+F\+S\+\_\+swap\+S\+B\+E64}}
\index{P\+H\+Y\+S\+F\+S\+\_\+swap\+S\+B\+E64@{P\+H\+Y\+S\+F\+S\+\_\+swap\+S\+B\+E64}!physfs.\+h@{physfs.\+h}}
\subsubsection{P\+H\+Y\+S\+F\+S\+\_\+swap\+S\+B\+E64()}
{\footnotesize\ttfamily \textbf{ P\+H\+Y\+S\+F\+S\+\_\+sint64} P\+H\+Y\+S\+F\+S\+\_\+swap\+S\+B\+E64 (\begin{DoxyParamCaption}\item[{\textbf{ P\+H\+Y\+S\+F\+S\+\_\+sint64}}]{val }\end{DoxyParamCaption})}



Swap bigendian signed 64 to platform\textquotesingle{}s native byte order. 

Take a 64-\/bit signed value in bigendian format and convert it to the platform\textquotesingle{}s native byte order.


\begin{DoxyParams}{Parameters}
{\em val} & value to convert \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
converted value.
\end{DoxyReturn}
\begin{DoxyWarning}{Warning}
Remember, P\+H\+Y\+S\+F\+S\+\_\+sint64 is only 32 bits on platforms without any sort of 64-\/bit support. 
\end{DoxyWarning}
\mbox{\label{physfs_8h_a73f900bb3ed3a2df81cf7c12b83b0fd4}} 
\index{physfs.\+h@{physfs.\+h}!P\+H\+Y\+S\+F\+S\+\_\+swap\+S\+L\+E16@{P\+H\+Y\+S\+F\+S\+\_\+swap\+S\+L\+E16}}
\index{P\+H\+Y\+S\+F\+S\+\_\+swap\+S\+L\+E16@{P\+H\+Y\+S\+F\+S\+\_\+swap\+S\+L\+E16}!physfs.\+h@{physfs.\+h}}
\subsubsection{P\+H\+Y\+S\+F\+S\+\_\+swap\+S\+L\+E16()}
{\footnotesize\ttfamily \textbf{ P\+H\+Y\+S\+F\+S\+\_\+sint16} P\+H\+Y\+S\+F\+S\+\_\+swap\+S\+L\+E16 (\begin{DoxyParamCaption}\item[{\textbf{ P\+H\+Y\+S\+F\+S\+\_\+sint16}}]{val }\end{DoxyParamCaption})}



Swap littleendian signed 16 to platform\textquotesingle{}s native byte order. 

Take a 16-\/bit signed value in littleendian format and convert it to the platform\textquotesingle{}s native byte order.


\begin{DoxyParams}{Parameters}
{\em val} & value to convert \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
converted value. 
\end{DoxyReturn}
\mbox{\label{physfs_8h_a9b59892fb2846084a272c1bfc4aade4e}} 
\index{physfs.\+h@{physfs.\+h}!P\+H\+Y\+S\+F\+S\+\_\+swap\+S\+L\+E32@{P\+H\+Y\+S\+F\+S\+\_\+swap\+S\+L\+E32}}
\index{P\+H\+Y\+S\+F\+S\+\_\+swap\+S\+L\+E32@{P\+H\+Y\+S\+F\+S\+\_\+swap\+S\+L\+E32}!physfs.\+h@{physfs.\+h}}
\subsubsection{P\+H\+Y\+S\+F\+S\+\_\+swap\+S\+L\+E32()}
{\footnotesize\ttfamily \textbf{ P\+H\+Y\+S\+F\+S\+\_\+sint32} P\+H\+Y\+S\+F\+S\+\_\+swap\+S\+L\+E32 (\begin{DoxyParamCaption}\item[{\textbf{ P\+H\+Y\+S\+F\+S\+\_\+sint32}}]{val }\end{DoxyParamCaption})}



Swap littleendian signed 32 to platform\textquotesingle{}s native byte order. 

Take a 32-\/bit signed value in littleendian format and convert it to the platform\textquotesingle{}s native byte order.


\begin{DoxyParams}{Parameters}
{\em val} & value to convert \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
converted value. 
\end{DoxyReturn}
\mbox{\label{physfs_8h_af032bd8e6116b2b3b6de279cb05b98a8}} 
\index{physfs.\+h@{physfs.\+h}!P\+H\+Y\+S\+F\+S\+\_\+swap\+S\+L\+E64@{P\+H\+Y\+S\+F\+S\+\_\+swap\+S\+L\+E64}}
\index{P\+H\+Y\+S\+F\+S\+\_\+swap\+S\+L\+E64@{P\+H\+Y\+S\+F\+S\+\_\+swap\+S\+L\+E64}!physfs.\+h@{physfs.\+h}}
\subsubsection{P\+H\+Y\+S\+F\+S\+\_\+swap\+S\+L\+E64()}
{\footnotesize\ttfamily \textbf{ P\+H\+Y\+S\+F\+S\+\_\+sint64} P\+H\+Y\+S\+F\+S\+\_\+swap\+S\+L\+E64 (\begin{DoxyParamCaption}\item[{\textbf{ P\+H\+Y\+S\+F\+S\+\_\+sint64}}]{val }\end{DoxyParamCaption})}



Swap littleendian signed 64 to platform\textquotesingle{}s native byte order. 

Take a 64-\/bit signed value in littleendian format and convert it to the platform\textquotesingle{}s native byte order.


\begin{DoxyParams}{Parameters}
{\em val} & value to convert \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
converted value.
\end{DoxyReturn}
\begin{DoxyWarning}{Warning}
Remember, P\+H\+Y\+S\+F\+S\+\_\+sint64 is only 32 bits on platforms without any sort of 64-\/bit support. 
\end{DoxyWarning}
\mbox{\label{physfs_8h_a056321eea71215938431ad4501c2cf9c}} 
\index{physfs.\+h@{physfs.\+h}!P\+H\+Y\+S\+F\+S\+\_\+swap\+U\+B\+E16@{P\+H\+Y\+S\+F\+S\+\_\+swap\+U\+B\+E16}}
\index{P\+H\+Y\+S\+F\+S\+\_\+swap\+U\+B\+E16@{P\+H\+Y\+S\+F\+S\+\_\+swap\+U\+B\+E16}!physfs.\+h@{physfs.\+h}}
\subsubsection{P\+H\+Y\+S\+F\+S\+\_\+swap\+U\+B\+E16()}
{\footnotesize\ttfamily \textbf{ P\+H\+Y\+S\+F\+S\+\_\+uint16} P\+H\+Y\+S\+F\+S\+\_\+swap\+U\+B\+E16 (\begin{DoxyParamCaption}\item[{\textbf{ P\+H\+Y\+S\+F\+S\+\_\+uint16}}]{val }\end{DoxyParamCaption})}



Swap bigendian unsigned 16 to platform\textquotesingle{}s native byte order. 

Take a 16-\/bit unsigned value in bigendian format and convert it to the platform\textquotesingle{}s native byte order.


\begin{DoxyParams}{Parameters}
{\em val} & value to convert \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
converted value. 
\end{DoxyReturn}
\mbox{\label{physfs_8h_a464ba8bc7f121e7f31423ad5d2ec6ed2}} 
\index{physfs.\+h@{physfs.\+h}!P\+H\+Y\+S\+F\+S\+\_\+swap\+U\+B\+E32@{P\+H\+Y\+S\+F\+S\+\_\+swap\+U\+B\+E32}}
\index{P\+H\+Y\+S\+F\+S\+\_\+swap\+U\+B\+E32@{P\+H\+Y\+S\+F\+S\+\_\+swap\+U\+B\+E32}!physfs.\+h@{physfs.\+h}}
\subsubsection{P\+H\+Y\+S\+F\+S\+\_\+swap\+U\+B\+E32()}
{\footnotesize\ttfamily \textbf{ P\+H\+Y\+S\+F\+S\+\_\+uint32} P\+H\+Y\+S\+F\+S\+\_\+swap\+U\+B\+E32 (\begin{DoxyParamCaption}\item[{\textbf{ P\+H\+Y\+S\+F\+S\+\_\+uint32}}]{val }\end{DoxyParamCaption})}



Swap bigendian unsigned 32 to platform\textquotesingle{}s native byte order. 

Take a 32-\/bit unsigned value in bigendian format and convert it to the platform\textquotesingle{}s native byte order.


\begin{DoxyParams}{Parameters}
{\em val} & value to convert \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
converted value. 
\end{DoxyReturn}
\mbox{\label{physfs_8h_a6c9b62d93cd121039c00554cb627a425}} 
\index{physfs.\+h@{physfs.\+h}!P\+H\+Y\+S\+F\+S\+\_\+swap\+U\+B\+E64@{P\+H\+Y\+S\+F\+S\+\_\+swap\+U\+B\+E64}}
\index{P\+H\+Y\+S\+F\+S\+\_\+swap\+U\+B\+E64@{P\+H\+Y\+S\+F\+S\+\_\+swap\+U\+B\+E64}!physfs.\+h@{physfs.\+h}}
\subsubsection{P\+H\+Y\+S\+F\+S\+\_\+swap\+U\+B\+E64()}
{\footnotesize\ttfamily \textbf{ P\+H\+Y\+S\+F\+S\+\_\+uint64} P\+H\+Y\+S\+F\+S\+\_\+swap\+U\+B\+E64 (\begin{DoxyParamCaption}\item[{\textbf{ P\+H\+Y\+S\+F\+S\+\_\+uint64}}]{val }\end{DoxyParamCaption})}



Swap bigendian unsigned 64 to platform\textquotesingle{}s native byte order. 

Take a 64-\/bit unsigned value in bigendian format and convert it to the platform\textquotesingle{}s native byte order.


\begin{DoxyParams}{Parameters}
{\em val} & value to convert \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
converted value.
\end{DoxyReturn}
\begin{DoxyWarning}{Warning}
Remember, P\+H\+Y\+S\+F\+S\+\_\+uint64 is only 32 bits on platforms without any sort of 64-\/bit support. 
\end{DoxyWarning}
\mbox{\label{physfs_8h_acb9b90e29f097f4feaa4568ec405db01}} 
\index{physfs.\+h@{physfs.\+h}!P\+H\+Y\+S\+F\+S\+\_\+swap\+U\+L\+E16@{P\+H\+Y\+S\+F\+S\+\_\+swap\+U\+L\+E16}}
\index{P\+H\+Y\+S\+F\+S\+\_\+swap\+U\+L\+E16@{P\+H\+Y\+S\+F\+S\+\_\+swap\+U\+L\+E16}!physfs.\+h@{physfs.\+h}}
\subsubsection{P\+H\+Y\+S\+F\+S\+\_\+swap\+U\+L\+E16()}
{\footnotesize\ttfamily \textbf{ P\+H\+Y\+S\+F\+S\+\_\+uint16} P\+H\+Y\+S\+F\+S\+\_\+swap\+U\+L\+E16 (\begin{DoxyParamCaption}\item[{\textbf{ P\+H\+Y\+S\+F\+S\+\_\+uint16}}]{val }\end{DoxyParamCaption})}



Swap littleendian unsigned 16 to platform\textquotesingle{}s native byte order. 

Take a 16-\/bit unsigned value in littleendian format and convert it to the platform\textquotesingle{}s native byte order.


\begin{DoxyParams}{Parameters}
{\em val} & value to convert \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
converted value. 
\end{DoxyReturn}
\mbox{\label{physfs_8h_a6e86a4c1461dc47784e3f68034ad97c9}} 
\index{physfs.\+h@{physfs.\+h}!P\+H\+Y\+S\+F\+S\+\_\+swap\+U\+L\+E32@{P\+H\+Y\+S\+F\+S\+\_\+swap\+U\+L\+E32}}
\index{P\+H\+Y\+S\+F\+S\+\_\+swap\+U\+L\+E32@{P\+H\+Y\+S\+F\+S\+\_\+swap\+U\+L\+E32}!physfs.\+h@{physfs.\+h}}
\subsubsection{P\+H\+Y\+S\+F\+S\+\_\+swap\+U\+L\+E32()}
{\footnotesize\ttfamily \textbf{ P\+H\+Y\+S\+F\+S\+\_\+uint32} P\+H\+Y\+S\+F\+S\+\_\+swap\+U\+L\+E32 (\begin{DoxyParamCaption}\item[{\textbf{ P\+H\+Y\+S\+F\+S\+\_\+uint32}}]{val }\end{DoxyParamCaption})}



Swap littleendian unsigned 32 to platform\textquotesingle{}s native byte order. 

Take a 32-\/bit unsigned value in littleendian format and convert it to the platform\textquotesingle{}s native byte order.


\begin{DoxyParams}{Parameters}
{\em val} & value to convert \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
converted value. 
\end{DoxyReturn}
\mbox{\label{physfs_8h_a4b7249bf3cae48f1e04d99505011f280}} 
\index{physfs.\+h@{physfs.\+h}!P\+H\+Y\+S\+F\+S\+\_\+swap\+U\+L\+E64@{P\+H\+Y\+S\+F\+S\+\_\+swap\+U\+L\+E64}}
\index{P\+H\+Y\+S\+F\+S\+\_\+swap\+U\+L\+E64@{P\+H\+Y\+S\+F\+S\+\_\+swap\+U\+L\+E64}!physfs.\+h@{physfs.\+h}}
\subsubsection{P\+H\+Y\+S\+F\+S\+\_\+swap\+U\+L\+E64()}
{\footnotesize\ttfamily \textbf{ P\+H\+Y\+S\+F\+S\+\_\+uint64} P\+H\+Y\+S\+F\+S\+\_\+swap\+U\+L\+E64 (\begin{DoxyParamCaption}\item[{\textbf{ P\+H\+Y\+S\+F\+S\+\_\+uint64}}]{val }\end{DoxyParamCaption})}



Swap littleendian unsigned 64 to platform\textquotesingle{}s native byte order. 

Take a 64-\/bit unsigned value in littleendian format and convert it to the platform\textquotesingle{}s native byte order.


\begin{DoxyParams}{Parameters}
{\em val} & value to convert \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
converted value.
\end{DoxyReturn}
\begin{DoxyWarning}{Warning}
Remember, P\+H\+Y\+S\+F\+S\+\_\+uint64 is only 32 bits on platforms without any sort of 64-\/bit support. 
\end{DoxyWarning}
\mbox{\label{physfs_8h_a5223ccbe06246dd5379d6a57d6cd0d87}} 
\index{physfs.\+h@{physfs.\+h}!P\+H\+Y\+S\+F\+S\+\_\+symbolic\+Links\+Permitted@{P\+H\+Y\+S\+F\+S\+\_\+symbolic\+Links\+Permitted}}
\index{P\+H\+Y\+S\+F\+S\+\_\+symbolic\+Links\+Permitted@{P\+H\+Y\+S\+F\+S\+\_\+symbolic\+Links\+Permitted}!physfs.\+h@{physfs.\+h}}
\subsubsection{P\+H\+Y\+S\+F\+S\+\_\+symbolic\+Links\+Permitted()}
{\footnotesize\ttfamily int P\+H\+Y\+S\+F\+S\+\_\+symbolic\+Links\+Permitted (\begin{DoxyParamCaption}\item[{void}]{ }\end{DoxyParamCaption})}



Determine if the symbolic links are permitted. 

This reports the setting from the last call to \doxyref{P\+H\+Y\+S\+F\+S\+\_\+permit\+Symbolic\+Links()}{p.}{physfs_8h_aad451d9b3f46f627a1be8caee2eef9b7}. If \doxyref{P\+H\+Y\+S\+F\+S\+\_\+permit\+Symbolic\+Links()}{p.}{physfs_8h_aad451d9b3f46f627a1be8caee2eef9b7} hasn\textquotesingle{}t been called since the library was last initialized, symbolic links are implicitly disabled.

\begin{DoxyReturn}{Returns}
non-\/zero if symlinks are permitted, zero if not.
\end{DoxyReturn}
\begin{DoxySeeAlso}{See also}
\doxyref{P\+H\+Y\+S\+F\+S\+\_\+permit\+Symbolic\+Links}{p.}{physfs_8h_aad451d9b3f46f627a1be8caee2eef9b7} 
\end{DoxySeeAlso}
\mbox{\label{physfs_8h_a0d481bdd4cf32ed1a41540ee59840c24}} 
\index{physfs.\+h@{physfs.\+h}!P\+H\+Y\+S\+F\+S\+\_\+tell@{P\+H\+Y\+S\+F\+S\+\_\+tell}}
\index{P\+H\+Y\+S\+F\+S\+\_\+tell@{P\+H\+Y\+S\+F\+S\+\_\+tell}!physfs.\+h@{physfs.\+h}}
\subsubsection{P\+H\+Y\+S\+F\+S\+\_\+tell()}
{\footnotesize\ttfamily \textbf{ P\+H\+Y\+S\+F\+S\+\_\+sint64} P\+H\+Y\+S\+F\+S\+\_\+tell (\begin{DoxyParamCaption}\item[{\textbf{ P\+H\+Y\+S\+F\+S\+\_\+\+File} $\ast$}]{handle }\end{DoxyParamCaption})}



Determine current position within a Physics\+FS filehandle. 


\begin{DoxyParams}{Parameters}
{\em handle} & handle returned from P\+H\+Y\+S\+F\+S\+\_\+open$\ast$(). \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
offset in bytes from start of file. -\/1 if error occurred. Use \doxyref{P\+H\+Y\+S\+F\+S\+\_\+get\+Last\+Error\+Code()}{p.}{physfs_8h_ae916a873aae2cf6b6e09d733cd1b3f4b} to obtain the specific error.
\end{DoxyReturn}
\begin{DoxySeeAlso}{See also}
\doxyref{P\+H\+Y\+S\+F\+S\+\_\+seek}{p.}{physfs_8h_ae562b45b1e1b02505ce1d82ad785f04a} 
\end{DoxySeeAlso}
\mbox{\label{physfs_8h_ad3753f0ac8e6a57ac438912ac68e97aa}} 
\index{physfs.\+h@{physfs.\+h}!P\+H\+Y\+S\+F\+S\+\_\+ucs4stricmp@{P\+H\+Y\+S\+F\+S\+\_\+ucs4stricmp}}
\index{P\+H\+Y\+S\+F\+S\+\_\+ucs4stricmp@{P\+H\+Y\+S\+F\+S\+\_\+ucs4stricmp}!physfs.\+h@{physfs.\+h}}
\subsubsection{P\+H\+Y\+S\+F\+S\+\_\+ucs4stricmp()}
{\footnotesize\ttfamily int P\+H\+Y\+S\+F\+S\+\_\+ucs4stricmp (\begin{DoxyParamCaption}\item[{const \textbf{ P\+H\+Y\+S\+F\+S\+\_\+uint32} $\ast$}]{str1,  }\item[{const \textbf{ P\+H\+Y\+S\+F\+S\+\_\+uint32} $\ast$}]{str2 }\end{DoxyParamCaption})}



Case-\/insensitive compare of two U\+C\+S-\/4 strings. 

This is a strcasecmp/stricmp replacement that expects both strings to be in U\+C\+S-\/4 (aka U\+T\+F-\/32) encoding. It will do \char`\"{}case folding\char`\"{} to decide if the Unicode codepoints in the strings match.

It will report which string is \char`\"{}greater than\char`\"{} the other, but be aware that this doesn\textquotesingle{}t necessarily mean anything\+: \textquotesingle{}a\textquotesingle{} may be \char`\"{}less than\char`\"{} \textquotesingle{}b\textquotesingle{}, but a Japanese kuten has no meaningful alphabetically relationship to a Greek lambda, but being able to assign a reliable \char`\"{}value\char`\"{} makes sorting algorithms possible, if not entirely sane. Most cases should treat the return value as \char`\"{}equal\char`\"{} or \char`\"{}not equal\char`\"{}.

Like stricmp, this expects both strings to be N\+U\+L\+L-\/terminated.


\begin{DoxyParams}{Parameters}
{\em str1} & First string to compare. \\
\hline
{\em str2} & Second string to compare. \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
-\/1 if str1 is \char`\"{}less than\char`\"{} str2, 1 if \char`\"{}greater than\char`\"{}, 0 if equal. 
\end{DoxyReturn}
\mbox{\label{physfs_8h_aab0e2ba90aa918b2ee1ed7c40293b442}} 
\index{physfs.\+h@{physfs.\+h}!P\+H\+Y\+S\+F\+S\+\_\+unmount@{P\+H\+Y\+S\+F\+S\+\_\+unmount}}
\index{P\+H\+Y\+S\+F\+S\+\_\+unmount@{P\+H\+Y\+S\+F\+S\+\_\+unmount}!physfs.\+h@{physfs.\+h}}
\subsubsection{P\+H\+Y\+S\+F\+S\+\_\+unmount()}
{\footnotesize\ttfamily int P\+H\+Y\+S\+F\+S\+\_\+unmount (\begin{DoxyParamCaption}\item[{const char $\ast$}]{old\+Dir }\end{DoxyParamCaption})}



Remove a directory or archive from the search path. 

This is functionally equivalent to \doxyref{P\+H\+Y\+S\+F\+S\+\_\+remove\+From\+Search\+Path()}{p.}{physfs_8h_a1e4ed59d6c80b8fb28904723cfd5b510}, but that function is deprecated to keep the vocabulary paired with \doxyref{P\+H\+Y\+S\+F\+S\+\_\+mount()}{p.}{physfs_8h_a8eb320e9af03dcdb4c05bbff3ea604d4}.

This must be a (case-\/sensitive) match to a dir or archive already in the search path, specified in platform-\/dependent notation.

This call will fail (and fail to remove from the path) if the element still has files open in it.

\begin{DoxyWarning}{Warning}
This function wants the path to the archive or directory that was mounted (the same string used for the \char`\"{}new\+Dir\char`\"{} argument of P\+H\+Y\+S\+F\+S\+\_\+add\+To\+Search\+Path or any of the mount functions), not the path where it is mounted in the tree (the \char`\"{}mount\+Point\char`\"{} argument to any of the mount functions).
\end{DoxyWarning}

\begin{DoxyParams}{Parameters}
{\em old\+Dir} & dir/archive to remove. \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
nonzero on success, zero on failure. Use \doxyref{P\+H\+Y\+S\+F\+S\+\_\+get\+Last\+Error\+Code()}{p.}{physfs_8h_ae916a873aae2cf6b6e09d733cd1b3f4b} to obtain the specific error.
\end{DoxyReturn}
\begin{DoxySeeAlso}{See also}
\doxyref{P\+H\+Y\+S\+F\+S\+\_\+get\+Search\+Path}{p.}{physfs_8h_ac738531e9c7e5ca3797b64985c103cf4} 

\doxyref{P\+H\+Y\+S\+F\+S\+\_\+mount}{p.}{physfs_8h_a8eb320e9af03dcdb4c05bbff3ea604d4} 
\end{DoxySeeAlso}
\mbox{\label{physfs_8h_a103f6e35c87cd635d5082b6cffd7974b}} 
\index{physfs.\+h@{physfs.\+h}!P\+H\+Y\+S\+F\+S\+\_\+utf16stricmp@{P\+H\+Y\+S\+F\+S\+\_\+utf16stricmp}}
\index{P\+H\+Y\+S\+F\+S\+\_\+utf16stricmp@{P\+H\+Y\+S\+F\+S\+\_\+utf16stricmp}!physfs.\+h@{physfs.\+h}}
\subsubsection{P\+H\+Y\+S\+F\+S\+\_\+utf16stricmp()}
{\footnotesize\ttfamily int P\+H\+Y\+S\+F\+S\+\_\+utf16stricmp (\begin{DoxyParamCaption}\item[{const \textbf{ P\+H\+Y\+S\+F\+S\+\_\+uint16} $\ast$}]{str1,  }\item[{const \textbf{ P\+H\+Y\+S\+F\+S\+\_\+uint16} $\ast$}]{str2 }\end{DoxyParamCaption})}



Case-\/insensitive compare of two U\+T\+F-\/16 strings. 

This is a strcasecmp/stricmp replacement that expects both strings to be in U\+T\+F-\/16 encoding. It will do \char`\"{}case folding\char`\"{} to decide if the Unicode codepoints in the strings match.

It will report which string is \char`\"{}greater than\char`\"{} the other, but be aware that this doesn\textquotesingle{}t necessarily mean anything\+: \textquotesingle{}a\textquotesingle{} may be \char`\"{}less than\char`\"{} \textquotesingle{}b\textquotesingle{}, but a Japanese kuten has no meaningful alphabetically relationship to a Greek lambda, but being able to assign a reliable \char`\"{}value\char`\"{} makes sorting algorithms possible, if not entirely sane. Most cases should treat the return value as \char`\"{}equal\char`\"{} or \char`\"{}not equal\char`\"{}.

Like stricmp, this expects both strings to be N\+U\+L\+L-\/terminated.


\begin{DoxyParams}{Parameters}
{\em str1} & First string to compare. \\
\hline
{\em str2} & Second string to compare. \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
-\/1 if str1 is \char`\"{}less than\char`\"{} str2, 1 if \char`\"{}greater than\char`\"{}, 0 if equal. 
\end{DoxyReturn}
\mbox{\label{physfs_8h_a2838ad1240439afd3a21109ea7138014}} 
\index{physfs.\+h@{physfs.\+h}!P\+H\+Y\+S\+F\+S\+\_\+utf8\+From\+Latin1@{P\+H\+Y\+S\+F\+S\+\_\+utf8\+From\+Latin1}}
\index{P\+H\+Y\+S\+F\+S\+\_\+utf8\+From\+Latin1@{P\+H\+Y\+S\+F\+S\+\_\+utf8\+From\+Latin1}!physfs.\+h@{physfs.\+h}}
\subsubsection{P\+H\+Y\+S\+F\+S\+\_\+utf8\+From\+Latin1()}
{\footnotesize\ttfamily void P\+H\+Y\+S\+F\+S\+\_\+utf8\+From\+Latin1 (\begin{DoxyParamCaption}\item[{const char $\ast$}]{src,  }\item[{char $\ast$}]{dst,  }\item[{\textbf{ P\+H\+Y\+S\+F\+S\+\_\+uint64}}]{len }\end{DoxyParamCaption})}



Convert a U\+T\+F-\/8 string to a Latin1 string. 

Latin1 strings are 8-\/bits per character\+: a popular \char`\"{}high A\+S\+C\+I\+I\char`\"{} encoding.

To ensure that the destination buffer is large enough for the conversion, please allocate a buffer that is double the size of the source buffer. U\+T\+F-\/8 expands latin1 codepoints over 127 from 1 to 2 bytes, so the string may grow in some cases.

Strings that don\textquotesingle{}t fit in the destination buffer will be truncated, but will always be null-\/terminated and never have an incomplete U\+T\+F-\/8 sequence at the end. If the buffer length is 0, this function does nothing.

Please note that we do not supply a U\+T\+F-\/8 to Latin1 converter, since Latin1 can\textquotesingle{}t express most Unicode codepoints. It\textquotesingle{}s a legacy encoding; you should be converting away from it at all times.


\begin{DoxyParams}{Parameters}
{\em src} & Null-\/terminated source string in Latin1 format. \\
\hline
{\em dst} & Buffer to store converted U\+T\+F-\/8 string. \\
\hline
{\em len} & Size, in bytes, of destination buffer. \\
\hline
\end{DoxyParams}
\mbox{\label{physfs_8h_ac4fdac7e09fb03ccdccdeed997f09c1a}} 
\index{physfs.\+h@{physfs.\+h}!P\+H\+Y\+S\+F\+S\+\_\+utf8\+From\+Ucs2@{P\+H\+Y\+S\+F\+S\+\_\+utf8\+From\+Ucs2}}
\index{P\+H\+Y\+S\+F\+S\+\_\+utf8\+From\+Ucs2@{P\+H\+Y\+S\+F\+S\+\_\+utf8\+From\+Ucs2}!physfs.\+h@{physfs.\+h}}
\subsubsection{P\+H\+Y\+S\+F\+S\+\_\+utf8\+From\+Ucs2()}
{\footnotesize\ttfamily void P\+H\+Y\+S\+F\+S\+\_\+utf8\+From\+Ucs2 (\begin{DoxyParamCaption}\item[{const \textbf{ P\+H\+Y\+S\+F\+S\+\_\+uint16} $\ast$}]{src,  }\item[{char $\ast$}]{dst,  }\item[{\textbf{ P\+H\+Y\+S\+F\+S\+\_\+uint64}}]{len }\end{DoxyParamCaption})}



Convert a U\+C\+S-\/2 string to a U\+T\+F-\/8 string. 

\begin{DoxyWarning}{Warning}
you almost certainly should use \doxyref{P\+H\+Y\+S\+F\+S\+\_\+utf8\+From\+Utf16()}{p.}{physfs_8h_abad1e7ea73fb2108e136fc043d9c4b30}, which became available in Physics\+FS 2.\+1, unless you know what you\textquotesingle{}re doing.

This function will not report an error if there are invalid U\+C\+S-\/2 values in the source string. It will replace them with a \textquotesingle{}?\textquotesingle{} character and continue on.
\end{DoxyWarning}
U\+C\+S-\/2 strings are 16-\/bits per character\+: {\ttfamily T\+C\+H\+AR} on Windows, when building with Unicode support. Please note that modern versions of Windows use U\+T\+F-\/16, which is an extended form of U\+C\+S-\/2, and not U\+C\+S-\/2 itself. You almost certainly want \doxyref{P\+H\+Y\+S\+F\+S\+\_\+utf8\+From\+Utf16()}{p.}{physfs_8h_abad1e7ea73fb2108e136fc043d9c4b30} instead.

To ensure that the destination buffer is large enough for the conversion, please allocate a buffer that is double the size of the source buffer. U\+T\+F-\/8 never uses more than 32-\/bits per character, so while it may shrink a U\+C\+S-\/2 string, it may also expand it.

Strings that don\textquotesingle{}t fit in the destination buffer will be truncated, but will always be null-\/terminated and never have an incomplete U\+T\+F-\/8 sequence at the end. If the buffer length is 0, this function does nothing.


\begin{DoxyParams}{Parameters}
{\em src} & Null-\/terminated source string in U\+C\+S-\/2 format. \\
\hline
{\em dst} & Buffer to store converted U\+T\+F-\/8 string. \\
\hline
{\em len} & Size, in bytes, of destination buffer.\\
\hline
\end{DoxyParams}
\begin{DoxySeeAlso}{See also}
\doxyref{P\+H\+Y\+S\+F\+S\+\_\+utf8\+From\+Utf16}{p.}{physfs_8h_abad1e7ea73fb2108e136fc043d9c4b30} 
\end{DoxySeeAlso}
\mbox{\label{physfs_8h_ac18c9c45db1be6fd26be19d0f4d25a60}} 
\index{physfs.\+h@{physfs.\+h}!P\+H\+Y\+S\+F\+S\+\_\+utf8\+From\+Ucs4@{P\+H\+Y\+S\+F\+S\+\_\+utf8\+From\+Ucs4}}
\index{P\+H\+Y\+S\+F\+S\+\_\+utf8\+From\+Ucs4@{P\+H\+Y\+S\+F\+S\+\_\+utf8\+From\+Ucs4}!physfs.\+h@{physfs.\+h}}
\subsubsection{P\+H\+Y\+S\+F\+S\+\_\+utf8\+From\+Ucs4()}
{\footnotesize\ttfamily void P\+H\+Y\+S\+F\+S\+\_\+utf8\+From\+Ucs4 (\begin{DoxyParamCaption}\item[{const \textbf{ P\+H\+Y\+S\+F\+S\+\_\+uint32} $\ast$}]{src,  }\item[{char $\ast$}]{dst,  }\item[{\textbf{ P\+H\+Y\+S\+F\+S\+\_\+uint64}}]{len }\end{DoxyParamCaption})}



Convert a U\+C\+S-\/4 string to a U\+T\+F-\/8 string. 

\begin{DoxyWarning}{Warning}
This function will not report an error if there are invalid U\+C\+S-\/4 values in the source string. It will replace them with a \textquotesingle{}?\textquotesingle{} character and continue on.
\end{DoxyWarning}
U\+C\+S-\/4 (aka U\+T\+F-\/32) strings are 32-\/bits per character\+: {\ttfamily wchar\+\_\+t} on Unix.

To ensure that the destination buffer is large enough for the conversion, please allocate a buffer that is the same size as the source buffer. U\+T\+F-\/8 never uses more than 32-\/bits per character, so while it may shrink a U\+C\+S-\/4 string, it will never expand it.

Strings that don\textquotesingle{}t fit in the destination buffer will be truncated, but will always be null-\/terminated and never have an incomplete U\+T\+F-\/8 sequence at the end. If the buffer length is 0, this function does nothing.


\begin{DoxyParams}{Parameters}
{\em src} & Null-\/terminated source string in U\+C\+S-\/4 format. \\
\hline
{\em dst} & Buffer to store converted U\+T\+F-\/8 string. \\
\hline
{\em len} & Size, in bytes, of destination buffer. \\
\hline
\end{DoxyParams}
\mbox{\label{physfs_8h_abad1e7ea73fb2108e136fc043d9c4b30}} 
\index{physfs.\+h@{physfs.\+h}!P\+H\+Y\+S\+F\+S\+\_\+utf8\+From\+Utf16@{P\+H\+Y\+S\+F\+S\+\_\+utf8\+From\+Utf16}}
\index{P\+H\+Y\+S\+F\+S\+\_\+utf8\+From\+Utf16@{P\+H\+Y\+S\+F\+S\+\_\+utf8\+From\+Utf16}!physfs.\+h@{physfs.\+h}}
\subsubsection{P\+H\+Y\+S\+F\+S\+\_\+utf8\+From\+Utf16()}
{\footnotesize\ttfamily void P\+H\+Y\+S\+F\+S\+\_\+utf8\+From\+Utf16 (\begin{DoxyParamCaption}\item[{const \textbf{ P\+H\+Y\+S\+F\+S\+\_\+uint16} $\ast$}]{src,  }\item[{char $\ast$}]{dst,  }\item[{\textbf{ P\+H\+Y\+S\+F\+S\+\_\+uint64}}]{len }\end{DoxyParamCaption})}



Convert a U\+T\+F-\/16 string to a U\+T\+F-\/8 string. 

\begin{DoxyWarning}{Warning}
This function will not report an error if there are invalid U\+T\+F-\/16 sequences in the source string. It will replace them with a \textquotesingle{}?\textquotesingle{} character and continue on.
\end{DoxyWarning}
U\+T\+F-\/16 strings are 16-\/bits per character (except some chars, which are 32-\/bits)\+: {\ttfamily T\+C\+H\+AR} on Windows, when building with Unicode support. Modern Windows releases use U\+T\+F-\/16. Windows releases before 2000 used T\+C\+H\+AR, but only handled U\+C\+S-\/2. U\+T\+F-\/16 {\itshape is} U\+C\+S-\/2, except for the characters that are 4 bytes, which aren\textquotesingle{}t representable in U\+C\+S-\/2 at all anyhow. If you aren\textquotesingle{}t sure, you should be using U\+T\+F-\/16 at this point on Windows.

To ensure that the destination buffer is large enough for the conversion, please allocate a buffer that is double the size of the source buffer. U\+T\+F-\/8 never uses more than 32-\/bits per character, so while it may shrink a U\+T\+F-\/16 string, it may also expand it.

Strings that don\textquotesingle{}t fit in the destination buffer will be truncated, but will always be null-\/terminated and never have an incomplete U\+T\+F-\/8 sequence at the end. If the buffer length is 0, this function does nothing.


\begin{DoxyParams}{Parameters}
{\em src} & Null-\/terminated source string in U\+T\+F-\/16 format. \\
\hline
{\em dst} & Buffer to store converted U\+T\+F-\/8 string. \\
\hline
{\em len} & Size, in bytes, of destination buffer. \\
\hline
\end{DoxyParams}
\mbox{\label{physfs_8h_aa84e68e54bb3b4df8161ea10d03db182}} 
\index{physfs.\+h@{physfs.\+h}!P\+H\+Y\+S\+F\+S\+\_\+utf8stricmp@{P\+H\+Y\+S\+F\+S\+\_\+utf8stricmp}}
\index{P\+H\+Y\+S\+F\+S\+\_\+utf8stricmp@{P\+H\+Y\+S\+F\+S\+\_\+utf8stricmp}!physfs.\+h@{physfs.\+h}}
\subsubsection{P\+H\+Y\+S\+F\+S\+\_\+utf8stricmp()}
{\footnotesize\ttfamily int P\+H\+Y\+S\+F\+S\+\_\+utf8stricmp (\begin{DoxyParamCaption}\item[{const char $\ast$}]{str1,  }\item[{const char $\ast$}]{str2 }\end{DoxyParamCaption})}



Case-\/insensitive compare of two U\+T\+F-\/8 strings. 

This is a strcasecmp/stricmp replacement that expects both strings to be in U\+T\+F-\/8 encoding. It will do \char`\"{}case folding\char`\"{} to decide if the Unicode codepoints in the strings match.

If both strings are exclusively low-\/\+A\+S\+C\+II characters, this will do the right thing, as that is also valid U\+T\+F-\/8. If there are any high-\/\+A\+S\+C\+II chars, this will not do what you expect!

It will report which string is \char`\"{}greater than\char`\"{} the other, but be aware that this doesn\textquotesingle{}t necessarily mean anything\+: \textquotesingle{}a\textquotesingle{} may be \char`\"{}less than\char`\"{} \textquotesingle{}b\textquotesingle{}, but a Japanese kuten has no meaningful alphabetically relationship to a Greek lambda, but being able to assign a reliable \char`\"{}value\char`\"{} makes sorting algorithms possible, if not entirely sane. Most cases should treat the return value as \char`\"{}equal\char`\"{} or \char`\"{}not equal\char`\"{}.

Like stricmp, this expects both strings to be N\+U\+L\+L-\/terminated.


\begin{DoxyParams}{Parameters}
{\em str1} & First string to compare. \\
\hline
{\em str2} & Second string to compare. \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
-\/1 if str1 is \char`\"{}less than\char`\"{} str2, 1 if \char`\"{}greater than\char`\"{}, 0 if equal. 
\end{DoxyReturn}
\mbox{\label{physfs_8h_a0ab51c265f7ca4e8218d6c74b4f43401}} 
\index{physfs.\+h@{physfs.\+h}!P\+H\+Y\+S\+F\+S\+\_\+utf8\+To\+Ucs2@{P\+H\+Y\+S\+F\+S\+\_\+utf8\+To\+Ucs2}}
\index{P\+H\+Y\+S\+F\+S\+\_\+utf8\+To\+Ucs2@{P\+H\+Y\+S\+F\+S\+\_\+utf8\+To\+Ucs2}!physfs.\+h@{physfs.\+h}}
\subsubsection{P\+H\+Y\+S\+F\+S\+\_\+utf8\+To\+Ucs2()}
{\footnotesize\ttfamily P\+H\+Y\+S\+F\+S\+\_\+utf8\+To\+Ucs2 (\begin{DoxyParamCaption}\item[{const char $\ast$}]{src,  }\item[{\textbf{ P\+H\+Y\+S\+F\+S\+\_\+uint16} $\ast$}]{dst,  }\item[{\textbf{ P\+H\+Y\+S\+F\+S\+\_\+uint64}}]{len }\end{DoxyParamCaption})}



Convert a U\+T\+F-\/8 string to a U\+C\+S-\/2 string. 

\begin{DoxyWarning}{Warning}
you almost certainly should use \doxyref{P\+H\+Y\+S\+F\+S\+\_\+utf8\+To\+Utf16()}{p.}{physfs_8h_adebf3f8244318c47e061f780ca8882f9}, which became available in Physics\+FS 2.\+1, unless you know what you\textquotesingle{}re doing.

This function will not report an error if there are invalid U\+T\+F-\/8 sequences in the source string. It will replace them with a \textquotesingle{}?\textquotesingle{} character and continue on.
\end{DoxyWarning}
U\+C\+S-\/2 strings are 16-\/bits per character\+: {\ttfamily T\+C\+H\+AR} on Windows, when building with Unicode support. Please note that modern versions of Windows use U\+T\+F-\/16, which is an extended form of U\+C\+S-\/2, and not U\+C\+S-\/2 itself. You almost certainly want \doxyref{P\+H\+Y\+S\+F\+S\+\_\+utf8\+To\+Utf16()}{p.}{physfs_8h_adebf3f8244318c47e061f780ca8882f9} instead, but you need to understand how that changes things, too.

To ensure that the destination buffer is large enough for the conversion, please allocate a buffer that is double the size of the source buffer. U\+T\+F-\/8 uses from one to four bytes per character, but U\+C\+S-\/2 always uses two, so an entirely low-\/\+A\+S\+C\+II string will double in size!

Strings that don\textquotesingle{}t fit in the destination buffer will be truncated, but will always be null-\/terminated and never have an incomplete U\+C\+S-\/2 sequence at the end. If the buffer length is 0, this function does nothing.


\begin{DoxyParams}{Parameters}
{\em src} & Null-\/terminated source string in U\+T\+F-\/8 format. \\
\hline
{\em dst} & Buffer to store converted U\+C\+S-\/2 string. \\
\hline
{\em len} & Size, in bytes, of destination buffer.\\
\hline
\end{DoxyParams}
\begin{DoxySeeAlso}{See also}
\doxyref{P\+H\+Y\+S\+F\+S\+\_\+utf8\+To\+Utf16}{p.}{physfs_8h_adebf3f8244318c47e061f780ca8882f9} 
\end{DoxySeeAlso}
\mbox{\label{physfs_8h_a3ff1045e71cd4c14607973da7bfc41e5}} 
\index{physfs.\+h@{physfs.\+h}!P\+H\+Y\+S\+F\+S\+\_\+utf8\+To\+Ucs4@{P\+H\+Y\+S\+F\+S\+\_\+utf8\+To\+Ucs4}}
\index{P\+H\+Y\+S\+F\+S\+\_\+utf8\+To\+Ucs4@{P\+H\+Y\+S\+F\+S\+\_\+utf8\+To\+Ucs4}!physfs.\+h@{physfs.\+h}}
\subsubsection{P\+H\+Y\+S\+F\+S\+\_\+utf8\+To\+Ucs4()}
{\footnotesize\ttfamily void P\+H\+Y\+S\+F\+S\+\_\+utf8\+To\+Ucs4 (\begin{DoxyParamCaption}\item[{const char $\ast$}]{src,  }\item[{\textbf{ P\+H\+Y\+S\+F\+S\+\_\+uint32} $\ast$}]{dst,  }\item[{\textbf{ P\+H\+Y\+S\+F\+S\+\_\+uint64}}]{len }\end{DoxyParamCaption})}



Convert a U\+T\+F-\/8 string to a U\+C\+S-\/4 string. 

\begin{DoxyWarning}{Warning}
This function will not report an error if there are invalid U\+T\+F-\/8 sequences in the source string. It will replace them with a \textquotesingle{}?\textquotesingle{} character and continue on.
\end{DoxyWarning}
U\+C\+S-\/4 (aka U\+T\+F-\/32) strings are 32-\/bits per character\+: {\ttfamily wchar\+\_\+t} on Unix.

To ensure that the destination buffer is large enough for the conversion, please allocate a buffer that is four times the size of the source buffer. U\+T\+F-\/8 uses from one to four bytes per character, but U\+C\+S-\/4 always uses four, so an entirely low-\/\+A\+S\+C\+II string will quadruple in size!

Strings that don\textquotesingle{}t fit in the destination buffer will be truncated, but will always be null-\/terminated and never have an incomplete U\+C\+S-\/4 sequence at the end. If the buffer length is 0, this function does nothing.


\begin{DoxyParams}{Parameters}
{\em src} & Null-\/terminated source string in U\+T\+F-\/8 format. \\
\hline
{\em dst} & Buffer to store converted U\+C\+S-\/4 string. \\
\hline
{\em len} & Size, in bytes, of destination buffer. \\
\hline
\end{DoxyParams}
\mbox{\label{physfs_8h_adebf3f8244318c47e061f780ca8882f9}} 
\index{physfs.\+h@{physfs.\+h}!P\+H\+Y\+S\+F\+S\+\_\+utf8\+To\+Utf16@{P\+H\+Y\+S\+F\+S\+\_\+utf8\+To\+Utf16}}
\index{P\+H\+Y\+S\+F\+S\+\_\+utf8\+To\+Utf16@{P\+H\+Y\+S\+F\+S\+\_\+utf8\+To\+Utf16}!physfs.\+h@{physfs.\+h}}
\subsubsection{P\+H\+Y\+S\+F\+S\+\_\+utf8\+To\+Utf16()}
{\footnotesize\ttfamily P\+H\+Y\+S\+F\+S\+\_\+utf8\+To\+Utf16 (\begin{DoxyParamCaption}\item[{const char $\ast$}]{src,  }\item[{\textbf{ P\+H\+Y\+S\+F\+S\+\_\+uint16} $\ast$}]{dst,  }\item[{\textbf{ P\+H\+Y\+S\+F\+S\+\_\+uint64}}]{len }\end{DoxyParamCaption})}



Convert a U\+T\+F-\/8 string to a U\+T\+F-\/16 string. 

\begin{DoxyWarning}{Warning}
This function will not report an error if there are invalid U\+T\+F-\/8 sequences in the source string. It will replace them with a \textquotesingle{}?\textquotesingle{} character and continue on.
\end{DoxyWarning}
U\+T\+F-\/16 strings are 16-\/bits per character (except some chars, which are 32-\/bits)\+: {\ttfamily T\+C\+H\+AR} on Windows, when building with Unicode support. Modern Windows releases use U\+T\+F-\/16. Windows releases before 2000 used T\+C\+H\+AR, but only handled U\+C\+S-\/2. U\+T\+F-\/16 {\itshape is} U\+C\+S-\/2, except for the characters that are 4 bytes, which aren\textquotesingle{}t representable in U\+C\+S-\/2 at all anyhow. If you aren\textquotesingle{}t sure, you should be using U\+T\+F-\/16 at this point on Windows.

To ensure that the destination buffer is large enough for the conversion, please allocate a buffer that is double the size of the source buffer. U\+T\+F-\/8 uses from one to four bytes per character, but U\+T\+F-\/16 always uses two to four, so an entirely low-\/\+A\+S\+C\+II string will double in size! The U\+T\+F-\/16 characters that would take four bytes also take four bytes in U\+T\+F-\/8, so you don\textquotesingle{}t need to allocate 4x the space just in case\+: double will do.

Strings that don\textquotesingle{}t fit in the destination buffer will be truncated, but will always be null-\/terminated and never have an incomplete U\+T\+F-\/16 surrogate pair at the end. If the buffer length is 0, this function does nothing.


\begin{DoxyParams}{Parameters}
{\em src} & Null-\/terminated source string in U\+T\+F-\/8 format. \\
\hline
{\em dst} & Buffer to store converted U\+T\+F-\/16 string. \\
\hline
{\em len} & Size, in bytes, of destination buffer.\\
\hline
\end{DoxyParams}
\begin{DoxySeeAlso}{See also}
\doxyref{P\+H\+Y\+S\+F\+S\+\_\+utf8\+To\+Utf16}{p.}{physfs_8h_adebf3f8244318c47e061f780ca8882f9} 
\end{DoxySeeAlso}
\mbox{\label{physfs_8h_af5dc83d5e4ef0b0c9bce1834ea1bb498}} 
\index{physfs.\+h@{physfs.\+h}!P\+H\+Y\+S\+F\+S\+\_\+write@{P\+H\+Y\+S\+F\+S\+\_\+write}}
\index{P\+H\+Y\+S\+F\+S\+\_\+write@{P\+H\+Y\+S\+F\+S\+\_\+write}!physfs.\+h@{physfs.\+h}}
\subsubsection{P\+H\+Y\+S\+F\+S\+\_\+write()}
{\footnotesize\ttfamily \textbf{ P\+H\+Y\+S\+F\+S\+\_\+sint64} P\+H\+Y\+S\+F\+S\+\_\+write (\begin{DoxyParamCaption}\item[{\textbf{ P\+H\+Y\+S\+F\+S\+\_\+\+File} $\ast$}]{handle,  }\item[{const void $\ast$}]{buffer,  }\item[{\textbf{ P\+H\+Y\+S\+F\+S\+\_\+uint32}}]{obj\+Size,  }\item[{\textbf{ P\+H\+Y\+S\+F\+S\+\_\+uint32}}]{obj\+Count }\end{DoxyParamCaption})}



Write data to a Physics\+FS filehandle. 

The file must be opened for writing.

\begin{DoxyRefDesc}{Deprecated}
\item[\textbf{ Deprecated}]As of Physics\+FS 2.\+1, use \doxyref{P\+H\+Y\+S\+F\+S\+\_\+write\+Bytes()}{p.}{physfs_8h_a192ae4f946656ae2aef5e16e438f94e1} instead. This function just wraps it anyhow. This function never clarified what would happen if you managed to write a partial object, so working at the byte level makes this cleaner for everyone, especially now that \doxyref{P\+H\+Y\+S\+F\+S\+\_\+\+Io}{p.}{structPHYSFS__Io} interfaces can be supplied by the application.\end{DoxyRefDesc}



\begin{DoxyParams}{Parameters}
{\em handle} & retval from \doxyref{P\+H\+Y\+S\+F\+S\+\_\+open\+Write()}{p.}{physfs_8h_abbf92d66c6cb82d0ede969aa2c964fba} or \doxyref{P\+H\+Y\+S\+F\+S\+\_\+open\+Append()}{p.}{physfs_8h_abeeca12e2fe7c5f68cbd67e2e5cafa3d}. \\
\hline
{\em buffer} & buffer of bytes to write to (handle). \\
\hline
{\em obj\+Size} & size in bytes of objects being written to (handle). \\
\hline
{\em obj\+Count} & number of (obj\+Size) objects to write to (handle). \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
number of objects written. \doxyref{P\+H\+Y\+S\+F\+S\+\_\+get\+Last\+Error\+Code()}{p.}{physfs_8h_ae916a873aae2cf6b6e09d733cd1b3f4b} can shed light on the reason this might be $<$ (obj\+Count). -\/1 if complete failure.
\end{DoxyReturn}
\begin{DoxySeeAlso}{See also}
\doxyref{P\+H\+Y\+S\+F\+S\+\_\+write\+Bytes}{p.}{physfs_8h_a192ae4f946656ae2aef5e16e438f94e1} 
\end{DoxySeeAlso}
\mbox{\label{physfs_8h_a192ae4f946656ae2aef5e16e438f94e1}} 
\index{physfs.\+h@{physfs.\+h}!P\+H\+Y\+S\+F\+S\+\_\+write\+Bytes@{P\+H\+Y\+S\+F\+S\+\_\+write\+Bytes}}
\index{P\+H\+Y\+S\+F\+S\+\_\+write\+Bytes@{P\+H\+Y\+S\+F\+S\+\_\+write\+Bytes}!physfs.\+h@{physfs.\+h}}
\subsubsection{P\+H\+Y\+S\+F\+S\+\_\+write\+Bytes()}
{\footnotesize\ttfamily \textbf{ P\+H\+Y\+S\+F\+S\+\_\+sint64} P\+H\+Y\+S\+F\+S\+\_\+write\+Bytes (\begin{DoxyParamCaption}\item[{\textbf{ P\+H\+Y\+S\+F\+S\+\_\+\+File} $\ast$}]{handle,  }\item[{const void $\ast$}]{buffer,  }\item[{\textbf{ P\+H\+Y\+S\+F\+S\+\_\+uint64}}]{len }\end{DoxyParamCaption})}



Write data to a Physics\+FS filehandle. 

The file must be opened for writing.

Please note that while (len) is an unsigned 64-\/bit integer, you are limited to 63 bits (9223372036854775807 bytes), so we can return a negative value on error. If length is greater than 0x7\+F\+F\+F\+F\+F\+F\+F\+F\+F\+F\+F\+F\+F\+FF, this function will immediately fail. For systems without a 64-\/bit datatype, you are limited to 31 bits (0x7\+F\+F\+F\+F\+F\+FF, or 2147483647 bytes). We trust most things won\textquotesingle{}t need to do multiple gigabytes of i/o in one call anyhow, but why limit things?


\begin{DoxyParams}{Parameters}
{\em handle} & retval from \doxyref{P\+H\+Y\+S\+F\+S\+\_\+open\+Write()}{p.}{physfs_8h_abbf92d66c6cb82d0ede969aa2c964fba} or \doxyref{P\+H\+Y\+S\+F\+S\+\_\+open\+Append()}{p.}{physfs_8h_abeeca12e2fe7c5f68cbd67e2e5cafa3d}. \\
\hline
{\em buffer} & buffer of (len) bytes to write to (handle). \\
\hline
{\em len} & number of bytes being written to (handle). \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
number of bytes written. This may be less than (len); in the case of an error, the system may try to write as many bytes as possible, so an incomplete write might occur. \doxyref{P\+H\+Y\+S\+F\+S\+\_\+get\+Last\+Error\+Code()}{p.}{physfs_8h_ae916a873aae2cf6b6e09d733cd1b3f4b} can shed light on the reason this might be $<$ (len). -\/1 if complete failure. 
\end{DoxyReturn}
\mbox{\label{physfs_8h_a621ed6d4cb61f9f31efb58acbe3090e3}} 
\index{physfs.\+h@{physfs.\+h}!P\+H\+Y\+S\+F\+S\+\_\+write\+S\+B\+E16@{P\+H\+Y\+S\+F\+S\+\_\+write\+S\+B\+E16}}
\index{P\+H\+Y\+S\+F\+S\+\_\+write\+S\+B\+E16@{P\+H\+Y\+S\+F\+S\+\_\+write\+S\+B\+E16}!physfs.\+h@{physfs.\+h}}
\subsubsection{P\+H\+Y\+S\+F\+S\+\_\+write\+S\+B\+E16()}
{\footnotesize\ttfamily int P\+H\+Y\+S\+F\+S\+\_\+write\+S\+B\+E16 (\begin{DoxyParamCaption}\item[{\textbf{ P\+H\+Y\+S\+F\+S\+\_\+\+File} $\ast$}]{file,  }\item[{\textbf{ P\+H\+Y\+S\+F\+S\+\_\+sint16}}]{val }\end{DoxyParamCaption})}



Convert and write a signed 16-\/bit bigendian value. 

Convenience function. Convert a signed 16-\/bit value from the platform\textquotesingle{}s native byte order to bigendian and write it to a file.


\begin{DoxyParams}{Parameters}
{\em file} & Physics\+FS file handle to which to write. \\
\hline
{\em val} & Value to convert and write. \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
zero on failure, non-\/zero on success. On failure, you can find out what went wrong from \doxyref{P\+H\+Y\+S\+F\+S\+\_\+get\+Last\+Error\+Code()}{p.}{physfs_8h_ae916a873aae2cf6b6e09d733cd1b3f4b}. 
\end{DoxyReturn}
\mbox{\label{physfs_8h_a065910571b8d1bc82eb6ef8e93936028}} 
\index{physfs.\+h@{physfs.\+h}!P\+H\+Y\+S\+F\+S\+\_\+write\+S\+B\+E32@{P\+H\+Y\+S\+F\+S\+\_\+write\+S\+B\+E32}}
\index{P\+H\+Y\+S\+F\+S\+\_\+write\+S\+B\+E32@{P\+H\+Y\+S\+F\+S\+\_\+write\+S\+B\+E32}!physfs.\+h@{physfs.\+h}}
\subsubsection{P\+H\+Y\+S\+F\+S\+\_\+write\+S\+B\+E32()}
{\footnotesize\ttfamily int P\+H\+Y\+S\+F\+S\+\_\+write\+S\+B\+E32 (\begin{DoxyParamCaption}\item[{\textbf{ P\+H\+Y\+S\+F\+S\+\_\+\+File} $\ast$}]{file,  }\item[{\textbf{ P\+H\+Y\+S\+F\+S\+\_\+sint32}}]{val }\end{DoxyParamCaption})}



Convert and write a signed 32-\/bit bigendian value. 

Convenience function. Convert a signed 32-\/bit value from the platform\textquotesingle{}s native byte order to bigendian and write it to a file.


\begin{DoxyParams}{Parameters}
{\em file} & Physics\+FS file handle to which to write. \\
\hline
{\em val} & Value to convert and write. \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
zero on failure, non-\/zero on success. On failure, you can find out what went wrong from \doxyref{P\+H\+Y\+S\+F\+S\+\_\+get\+Last\+Error\+Code()}{p.}{physfs_8h_ae916a873aae2cf6b6e09d733cd1b3f4b}. 
\end{DoxyReturn}
\mbox{\label{physfs_8h_ab5f40bbc37733f52fde58e7a5bc55341}} 
\index{physfs.\+h@{physfs.\+h}!P\+H\+Y\+S\+F\+S\+\_\+write\+S\+B\+E64@{P\+H\+Y\+S\+F\+S\+\_\+write\+S\+B\+E64}}
\index{P\+H\+Y\+S\+F\+S\+\_\+write\+S\+B\+E64@{P\+H\+Y\+S\+F\+S\+\_\+write\+S\+B\+E64}!physfs.\+h@{physfs.\+h}}
\subsubsection{P\+H\+Y\+S\+F\+S\+\_\+write\+S\+B\+E64()}
{\footnotesize\ttfamily int P\+H\+Y\+S\+F\+S\+\_\+write\+S\+B\+E64 (\begin{DoxyParamCaption}\item[{\textbf{ P\+H\+Y\+S\+F\+S\+\_\+\+File} $\ast$}]{file,  }\item[{\textbf{ P\+H\+Y\+S\+F\+S\+\_\+sint64}}]{val }\end{DoxyParamCaption})}



Convert and write a signed 64-\/bit bigending value. 

Convenience function. Convert a signed 64-\/bit value from the platform\textquotesingle{}s native byte order to bigendian and write it to a file.


\begin{DoxyParams}{Parameters}
{\em file} & Physics\+FS file handle to which to write. \\
\hline
{\em val} & Value to convert and write. \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
zero on failure, non-\/zero on success. On failure, you can find out what went wrong from \doxyref{P\+H\+Y\+S\+F\+S\+\_\+get\+Last\+Error\+Code()}{p.}{physfs_8h_ae916a873aae2cf6b6e09d733cd1b3f4b}.
\end{DoxyReturn}
\begin{DoxyWarning}{Warning}
Remember, P\+H\+Y\+S\+F\+S\+\_\+sint64 is only 32 bits on platforms without any sort of 64-\/bit support. 
\end{DoxyWarning}
\mbox{\label{physfs_8h_aeaee4b15c4d683a1996ffc72d1d2a6aa}} 
\index{physfs.\+h@{physfs.\+h}!P\+H\+Y\+S\+F\+S\+\_\+write\+S\+L\+E16@{P\+H\+Y\+S\+F\+S\+\_\+write\+S\+L\+E16}}
\index{P\+H\+Y\+S\+F\+S\+\_\+write\+S\+L\+E16@{P\+H\+Y\+S\+F\+S\+\_\+write\+S\+L\+E16}!physfs.\+h@{physfs.\+h}}
\subsubsection{P\+H\+Y\+S\+F\+S\+\_\+write\+S\+L\+E16()}
{\footnotesize\ttfamily int P\+H\+Y\+S\+F\+S\+\_\+write\+S\+L\+E16 (\begin{DoxyParamCaption}\item[{\textbf{ P\+H\+Y\+S\+F\+S\+\_\+\+File} $\ast$}]{file,  }\item[{\textbf{ P\+H\+Y\+S\+F\+S\+\_\+sint16}}]{val }\end{DoxyParamCaption})}



Convert and write a signed 16-\/bit littleendian value. 

Convenience function. Convert a signed 16-\/bit value from the platform\textquotesingle{}s native byte order to littleendian and write it to a file.


\begin{DoxyParams}{Parameters}
{\em file} & Physics\+FS file handle to which to write. \\
\hline
{\em val} & Value to convert and write. \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
zero on failure, non-\/zero on success. On failure, you can find out what went wrong from \doxyref{P\+H\+Y\+S\+F\+S\+\_\+get\+Last\+Error\+Code()}{p.}{physfs_8h_ae916a873aae2cf6b6e09d733cd1b3f4b}. 
\end{DoxyReturn}
\mbox{\label{physfs_8h_a3a702d04d16b0fa732905b0e7daab407}} 
\index{physfs.\+h@{physfs.\+h}!P\+H\+Y\+S\+F\+S\+\_\+write\+S\+L\+E32@{P\+H\+Y\+S\+F\+S\+\_\+write\+S\+L\+E32}}
\index{P\+H\+Y\+S\+F\+S\+\_\+write\+S\+L\+E32@{P\+H\+Y\+S\+F\+S\+\_\+write\+S\+L\+E32}!physfs.\+h@{physfs.\+h}}
\subsubsection{P\+H\+Y\+S\+F\+S\+\_\+write\+S\+L\+E32()}
{\footnotesize\ttfamily int P\+H\+Y\+S\+F\+S\+\_\+write\+S\+L\+E32 (\begin{DoxyParamCaption}\item[{\textbf{ P\+H\+Y\+S\+F\+S\+\_\+\+File} $\ast$}]{file,  }\item[{\textbf{ P\+H\+Y\+S\+F\+S\+\_\+sint32}}]{val }\end{DoxyParamCaption})}



Convert and write a signed 32-\/bit littleendian value. 

Convenience function. Convert a signed 32-\/bit value from the platform\textquotesingle{}s native byte order to littleendian and write it to a file.


\begin{DoxyParams}{Parameters}
{\em file} & Physics\+FS file handle to which to write. \\
\hline
{\em val} & Value to convert and write. \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
zero on failure, non-\/zero on success. On failure, you can find out what went wrong from \doxyref{P\+H\+Y\+S\+F\+S\+\_\+get\+Last\+Error\+Code()}{p.}{physfs_8h_ae916a873aae2cf6b6e09d733cd1b3f4b}. 
\end{DoxyReturn}
\mbox{\label{physfs_8h_ab48f7be67e4d68315709e7b3fa48f34b}} 
\index{physfs.\+h@{physfs.\+h}!P\+H\+Y\+S\+F\+S\+\_\+write\+S\+L\+E64@{P\+H\+Y\+S\+F\+S\+\_\+write\+S\+L\+E64}}
\index{P\+H\+Y\+S\+F\+S\+\_\+write\+S\+L\+E64@{P\+H\+Y\+S\+F\+S\+\_\+write\+S\+L\+E64}!physfs.\+h@{physfs.\+h}}
\subsubsection{P\+H\+Y\+S\+F\+S\+\_\+write\+S\+L\+E64()}
{\footnotesize\ttfamily int P\+H\+Y\+S\+F\+S\+\_\+write\+S\+L\+E64 (\begin{DoxyParamCaption}\item[{\textbf{ P\+H\+Y\+S\+F\+S\+\_\+\+File} $\ast$}]{file,  }\item[{\textbf{ P\+H\+Y\+S\+F\+S\+\_\+sint64}}]{val }\end{DoxyParamCaption})}



Convert and write a signed 64-\/bit littleendian value. 

Convenience function. Convert a signed 64-\/bit value from the platform\textquotesingle{}s native byte order to littleendian and write it to a file.


\begin{DoxyParams}{Parameters}
{\em file} & Physics\+FS file handle to which to write. \\
\hline
{\em val} & Value to convert and write. \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
zero on failure, non-\/zero on success. On failure, you can find out what went wrong from \doxyref{P\+H\+Y\+S\+F\+S\+\_\+get\+Last\+Error\+Code()}{p.}{physfs_8h_ae916a873aae2cf6b6e09d733cd1b3f4b}.
\end{DoxyReturn}
\begin{DoxyWarning}{Warning}
Remember, P\+H\+Y\+S\+F\+S\+\_\+sint64 is only 32 bits on platforms without any sort of 64-\/bit support. 
\end{DoxyWarning}
\mbox{\label{physfs_8h_a66a392f7637bb2ad4c3e395e1a71c54e}} 
\index{physfs.\+h@{physfs.\+h}!P\+H\+Y\+S\+F\+S\+\_\+write\+U\+B\+E16@{P\+H\+Y\+S\+F\+S\+\_\+write\+U\+B\+E16}}
\index{P\+H\+Y\+S\+F\+S\+\_\+write\+U\+B\+E16@{P\+H\+Y\+S\+F\+S\+\_\+write\+U\+B\+E16}!physfs.\+h@{physfs.\+h}}
\subsubsection{P\+H\+Y\+S\+F\+S\+\_\+write\+U\+B\+E16()}
{\footnotesize\ttfamily int P\+H\+Y\+S\+F\+S\+\_\+write\+U\+B\+E16 (\begin{DoxyParamCaption}\item[{\textbf{ P\+H\+Y\+S\+F\+S\+\_\+\+File} $\ast$}]{file,  }\item[{\textbf{ P\+H\+Y\+S\+F\+S\+\_\+uint16}}]{val }\end{DoxyParamCaption})}



Convert and write an unsigned 16-\/bit bigendian value. 

Convenience function. Convert an unsigned 16-\/bit value from the platform\textquotesingle{}s native byte order to bigendian and write it to a file.


\begin{DoxyParams}{Parameters}
{\em file} & Physics\+FS file handle to which to write. \\
\hline
{\em val} & Value to convert and write. \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
zero on failure, non-\/zero on success. On failure, you can find out what went wrong from \doxyref{P\+H\+Y\+S\+F\+S\+\_\+get\+Last\+Error\+Code()}{p.}{physfs_8h_ae916a873aae2cf6b6e09d733cd1b3f4b}. 
\end{DoxyReturn}
\mbox{\label{physfs_8h_a98a497bc47cb177fe1bf835abe28baad}} 
\index{physfs.\+h@{physfs.\+h}!P\+H\+Y\+S\+F\+S\+\_\+write\+U\+B\+E32@{P\+H\+Y\+S\+F\+S\+\_\+write\+U\+B\+E32}}
\index{P\+H\+Y\+S\+F\+S\+\_\+write\+U\+B\+E32@{P\+H\+Y\+S\+F\+S\+\_\+write\+U\+B\+E32}!physfs.\+h@{physfs.\+h}}
\subsubsection{P\+H\+Y\+S\+F\+S\+\_\+write\+U\+B\+E32()}
{\footnotesize\ttfamily int P\+H\+Y\+S\+F\+S\+\_\+write\+U\+B\+E32 (\begin{DoxyParamCaption}\item[{\textbf{ P\+H\+Y\+S\+F\+S\+\_\+\+File} $\ast$}]{file,  }\item[{\textbf{ P\+H\+Y\+S\+F\+S\+\_\+uint32}}]{val }\end{DoxyParamCaption})}



Convert and write an unsigned 32-\/bit bigendian value. 

Convenience function. Convert an unsigned 32-\/bit value from the platform\textquotesingle{}s native byte order to bigendian and write it to a file.


\begin{DoxyParams}{Parameters}
{\em file} & Physics\+FS file handle to which to write. \\
\hline
{\em val} & Value to convert and write. \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
zero on failure, non-\/zero on success. On failure, you can find out what went wrong from \doxyref{P\+H\+Y\+S\+F\+S\+\_\+get\+Last\+Error\+Code()}{p.}{physfs_8h_ae916a873aae2cf6b6e09d733cd1b3f4b}. 
\end{DoxyReturn}
\mbox{\label{physfs_8h_a03fc124e5dfd2801361eeefcee7d1ff7}} 
\index{physfs.\+h@{physfs.\+h}!P\+H\+Y\+S\+F\+S\+\_\+write\+U\+B\+E64@{P\+H\+Y\+S\+F\+S\+\_\+write\+U\+B\+E64}}
\index{P\+H\+Y\+S\+F\+S\+\_\+write\+U\+B\+E64@{P\+H\+Y\+S\+F\+S\+\_\+write\+U\+B\+E64}!physfs.\+h@{physfs.\+h}}
\subsubsection{P\+H\+Y\+S\+F\+S\+\_\+write\+U\+B\+E64()}
{\footnotesize\ttfamily int P\+H\+Y\+S\+F\+S\+\_\+write\+U\+B\+E64 (\begin{DoxyParamCaption}\item[{\textbf{ P\+H\+Y\+S\+F\+S\+\_\+\+File} $\ast$}]{file,  }\item[{\textbf{ P\+H\+Y\+S\+F\+S\+\_\+uint64}}]{val }\end{DoxyParamCaption})}



Convert and write an unsigned 64-\/bit bigendian value. 

Convenience function. Convert an unsigned 64-\/bit value from the platform\textquotesingle{}s native byte order to bigendian and write it to a file.


\begin{DoxyParams}{Parameters}
{\em file} & Physics\+FS file handle to which to write. \\
\hline
{\em val} & Value to convert and write. \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
zero on failure, non-\/zero on success. On failure, you can find out what went wrong from \doxyref{P\+H\+Y\+S\+F\+S\+\_\+get\+Last\+Error\+Code()}{p.}{physfs_8h_ae916a873aae2cf6b6e09d733cd1b3f4b}.
\end{DoxyReturn}
\begin{DoxyWarning}{Warning}
Remember, P\+H\+Y\+S\+F\+S\+\_\+uint64 is only 32 bits on platforms without any sort of 64-\/bit support. 
\end{DoxyWarning}
\mbox{\label{physfs_8h_add6bdd5da0e7466b2bace0c914bcf3ac}} 
\index{physfs.\+h@{physfs.\+h}!P\+H\+Y\+S\+F\+S\+\_\+write\+U\+L\+E16@{P\+H\+Y\+S\+F\+S\+\_\+write\+U\+L\+E16}}
\index{P\+H\+Y\+S\+F\+S\+\_\+write\+U\+L\+E16@{P\+H\+Y\+S\+F\+S\+\_\+write\+U\+L\+E16}!physfs.\+h@{physfs.\+h}}
\subsubsection{P\+H\+Y\+S\+F\+S\+\_\+write\+U\+L\+E16()}
{\footnotesize\ttfamily int P\+H\+Y\+S\+F\+S\+\_\+write\+U\+L\+E16 (\begin{DoxyParamCaption}\item[{\textbf{ P\+H\+Y\+S\+F\+S\+\_\+\+File} $\ast$}]{file,  }\item[{\textbf{ P\+H\+Y\+S\+F\+S\+\_\+uint16}}]{val }\end{DoxyParamCaption})}



Convert and write an unsigned 16-\/bit littleendian value. 

Convenience function. Convert an unsigned 16-\/bit value from the platform\textquotesingle{}s native byte order to littleendian and write it to a file.


\begin{DoxyParams}{Parameters}
{\em file} & Physics\+FS file handle to which to write. \\
\hline
{\em val} & Value to convert and write. \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
zero on failure, non-\/zero on success. On failure, you can find out what went wrong from \doxyref{P\+H\+Y\+S\+F\+S\+\_\+get\+Last\+Error\+Code()}{p.}{physfs_8h_ae916a873aae2cf6b6e09d733cd1b3f4b}. 
\end{DoxyReturn}
\mbox{\label{physfs_8h_a9566e5d04e793b851dc7b9c26f3b23cb}} 
\index{physfs.\+h@{physfs.\+h}!P\+H\+Y\+S\+F\+S\+\_\+write\+U\+L\+E32@{P\+H\+Y\+S\+F\+S\+\_\+write\+U\+L\+E32}}
\index{P\+H\+Y\+S\+F\+S\+\_\+write\+U\+L\+E32@{P\+H\+Y\+S\+F\+S\+\_\+write\+U\+L\+E32}!physfs.\+h@{physfs.\+h}}
\subsubsection{P\+H\+Y\+S\+F\+S\+\_\+write\+U\+L\+E32()}
{\footnotesize\ttfamily int P\+H\+Y\+S\+F\+S\+\_\+write\+U\+L\+E32 (\begin{DoxyParamCaption}\item[{\textbf{ P\+H\+Y\+S\+F\+S\+\_\+\+File} $\ast$}]{file,  }\item[{\textbf{ P\+H\+Y\+S\+F\+S\+\_\+uint32}}]{val }\end{DoxyParamCaption})}



Convert and write an unsigned 32-\/bit littleendian value. 

Convenience function. Convert an unsigned 32-\/bit value from the platform\textquotesingle{}s native byte order to littleendian and write it to a file.


\begin{DoxyParams}{Parameters}
{\em file} & Physics\+FS file handle to which to write. \\
\hline
{\em val} & Value to convert and write. \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
zero on failure, non-\/zero on success. On failure, you can find out what went wrong from \doxyref{P\+H\+Y\+S\+F\+S\+\_\+get\+Last\+Error\+Code()}{p.}{physfs_8h_ae916a873aae2cf6b6e09d733cd1b3f4b}. 
\end{DoxyReturn}
\mbox{\label{physfs_8h_aaeb795dbdde0fb87fbc8b92471fb85ab}} 
\index{physfs.\+h@{physfs.\+h}!P\+H\+Y\+S\+F\+S\+\_\+write\+U\+L\+E64@{P\+H\+Y\+S\+F\+S\+\_\+write\+U\+L\+E64}}
\index{P\+H\+Y\+S\+F\+S\+\_\+write\+U\+L\+E64@{P\+H\+Y\+S\+F\+S\+\_\+write\+U\+L\+E64}!physfs.\+h@{physfs.\+h}}
\subsubsection{P\+H\+Y\+S\+F\+S\+\_\+write\+U\+L\+E64()}
{\footnotesize\ttfamily int P\+H\+Y\+S\+F\+S\+\_\+write\+U\+L\+E64 (\begin{DoxyParamCaption}\item[{\textbf{ P\+H\+Y\+S\+F\+S\+\_\+\+File} $\ast$}]{file,  }\item[{\textbf{ P\+H\+Y\+S\+F\+S\+\_\+uint64}}]{val }\end{DoxyParamCaption})}



Convert and write an unsigned 64-\/bit littleendian value. 

Convenience function. Convert an unsigned 64-\/bit value from the platform\textquotesingle{}s native byte order to littleendian and write it to a file.


\begin{DoxyParams}{Parameters}
{\em file} & Physics\+FS file handle to which to write. \\
\hline
{\em val} & Value to convert and write. \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
zero on failure, non-\/zero on success. On failure, you can find out what went wrong from \doxyref{P\+H\+Y\+S\+F\+S\+\_\+get\+Last\+Error\+Code()}{p.}{physfs_8h_ae916a873aae2cf6b6e09d733cd1b3f4b}.
\end{DoxyReturn}
\begin{DoxyWarning}{Warning}
Remember, P\+H\+Y\+S\+F\+S\+\_\+uint64 is only 32 bits on platforms without any sort of 64-\/bit support. 
\end{DoxyWarning}
