\hypertarget{class_ogre_1_1_file_system_layer}{}\section{Ogre\+:\+:File\+System\+Layer Class Reference}
\label{class_ogre_1_1_file_system_layer}\index{Ogre\+::\+File\+System\+Layer@{Ogre\+::\+File\+System\+Layer}}


Provides methods to find out where the \hyperlink{namespace_ogre}{Ogre} config files are stored and where logs and settings files should be written to.  




{\ttfamily \#include $<$Ogre\+File\+System\+Layer.\+h$>$}



Inheritance diagram for Ogre\+:\+:File\+System\+Layer\+:
\nopagebreak
\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=206pt]{class_ogre_1_1_file_system_layer__inherit__graph}
\end{center}
\end{figure}
\subsection*{Public Member Functions}
\begin{DoxyCompactItemize}
\item 
\hyperlink{class_ogre_1_1_file_system_layer_a7b8a94fb30ca04060b3c0b09b12af7c4}{File\+System\+Layer} (const \hyperlink{namespace_ogre_af73bbdc8bed8a3e6fcd56bb8fa188c45}{Ogre\+::\+String} \&subdir)
\begin{DoxyCompactList}\small\item\em Creates a concrete platform-\/dependent implementation of \hyperlink{class_ogre_1_1_file_system_layer}{File\+System\+Layer}. \end{DoxyCompactList}\item 
\hyperlink{namespace_ogre_af73bbdc8bed8a3e6fcd56bb8fa188c45}{Ogre\+::\+String} \hyperlink{class_ogre_1_1_file_system_layer_a7af51345a08a299fde4ec672b00ce9f8}{get\+Config\+File\+Path} (\hyperlink{namespace_ogre_af73bbdc8bed8a3e6fcd56bb8fa188c45}{Ogre\+::\+String} filename) const
\begin{DoxyCompactList}\small\item\em Search for the given config file in the user\textquotesingle{}s home path. \end{DoxyCompactList}\item 
\hyperlink{namespace_ogre_af73bbdc8bed8a3e6fcd56bb8fa188c45}{Ogre\+::\+String} \hyperlink{class_ogre_1_1_file_system_layer_a0e606f77e2deb5961b8001cbdfe35e22}{get\+Writable\+Path} (const \hyperlink{namespace_ogre_af73bbdc8bed8a3e6fcd56bb8fa188c45}{Ogre\+::\+String} \&filename) const
\begin{DoxyCompactList}\small\item\em Find a path where the given filename can be written to. \end{DoxyCompactList}\item 
void \hyperlink{class_ogre_1_1_file_system_layer_aa2ab8206fdc0f858fbe27e94e3297dbf}{set\+Config\+Paths} (const \hyperlink{group___general_ga783e5227595f351519627abfb740ec85}{Ogre\+::\+String\+Vector} \&paths)
\item 
void \hyperlink{class_ogre_1_1_file_system_layer_afeaaf6f11cd5722e589a4c793d5a98cb}{set\+Home\+Path} (const \hyperlink{namespace_ogre_af73bbdc8bed8a3e6fcd56bb8fa188c45}{Ogre\+::\+String} \&path)
\end{DoxyCompactItemize}
\subsection*{Static Public Member Functions}
\begin{DoxyCompactItemize}
\item 
static bool \hyperlink{class_ogre_1_1_file_system_layer_a0a2d92288292403038f30364043ee753}{create\+Directory} (const \hyperlink{namespace_ogre_af73bbdc8bed8a3e6fcd56bb8fa188c45}{Ogre\+::\+String} \&name)
\begin{DoxyCompactList}\small\item\em Create a directory. \end{DoxyCompactList}\item 
static bool \hyperlink{class_ogre_1_1_file_system_layer_a6566c95649770d52628853f5dfcf8ea6}{file\+Exists} (const \hyperlink{namespace_ogre_af73bbdc8bed8a3e6fcd56bb8fa188c45}{Ogre\+::\+String} \&path)
\begin{DoxyCompactList}\small\item\em Test if the given file exists. \end{DoxyCompactList}\item 
static bool \hyperlink{class_ogre_1_1_file_system_layer_a2fa242f9327be916ac34f699464698af}{remove\+Directory} (const \hyperlink{namespace_ogre_af73bbdc8bed8a3e6fcd56bb8fa188c45}{Ogre\+::\+String} \&name)
\begin{DoxyCompactList}\small\item\em Delete a directory. \end{DoxyCompactList}\item 
static bool \hyperlink{class_ogre_1_1_file_system_layer_a1fecc5387500843ef0c0c0b732824206}{remove\+File} (const \hyperlink{namespace_ogre_af73bbdc8bed8a3e6fcd56bb8fa188c45}{Ogre\+::\+String} \&path)
\begin{DoxyCompactList}\small\item\em Delete a file. \end{DoxyCompactList}\item 
static bool \hyperlink{class_ogre_1_1_file_system_layer_a09fa0a7da021d71cd7b6e2982d52effc}{rename\+File} (const \hyperlink{namespace_ogre_af73bbdc8bed8a3e6fcd56bb8fa188c45}{Ogre\+::\+String} \&oldpath, const \hyperlink{namespace_ogre_af73bbdc8bed8a3e6fcd56bb8fa188c45}{Ogre\+::\+String} \&newpath)
\begin{DoxyCompactList}\small\item\em Rename a file. \end{DoxyCompactList}\item 
static \hyperlink{namespace_ogre_af73bbdc8bed8a3e6fcd56bb8fa188c45}{String} \hyperlink{class_ogre_1_1_file_system_layer_a16c94bbb670ff33107cc568b73edae40}{resolve\+Bundle\+Path} (\hyperlink{namespace_ogre_af73bbdc8bed8a3e6fcd56bb8fa188c45}{String} path)
\begin{DoxyCompactList}\small\item\em Resolve path inside the application bundle on some platforms \hyperlink{namespace_ogre}{Ogre} is delivered as an application bundle this function resolves the given path such that it points inside that bundle. \end{DoxyCompactList}\end{DoxyCompactItemize}


\subsection{Detailed Description}
Provides methods to find out where the \hyperlink{namespace_ogre}{Ogre} config files are stored and where logs and settings files should be written to. 

\begin{DoxyRemark}{Remarks}
In modern multi-\/user OS, a standard user account will often not have write access to the path where the Sample\+Browser is stored. In order to still be able to store graphics settings and log output and for the user to overwrite the default \hyperlink{namespace_ogre}{Ogre} config files, this class tries to create a folder inside the user\textquotesingle{}s home directory. Specialised implementations for each individual platform must subclass this abstract interface.\+Implementation for the \hyperlink{class_ogre_1_1_file_system_layer}{File\+System\+Layer} interface. 
\end{DoxyRemark}


\subsection{Constructor \& Destructor Documentation}
\mbox{\Hypertarget{class_ogre_1_1_file_system_layer_a7b8a94fb30ca04060b3c0b09b12af7c4}\label{class_ogre_1_1_file_system_layer_a7b8a94fb30ca04060b3c0b09b12af7c4}} 
\index{Ogre\+::\+File\+System\+Layer@{Ogre\+::\+File\+System\+Layer}!File\+System\+Layer@{File\+System\+Layer}}
\index{File\+System\+Layer@{File\+System\+Layer}!Ogre\+::\+File\+System\+Layer@{Ogre\+::\+File\+System\+Layer}}
\subsubsection{\texorpdfstring{File\+System\+Layer()}{FileSystemLayer()}}
{\footnotesize\ttfamily Ogre\+::\+File\+System\+Layer\+::\+File\+System\+Layer (\begin{DoxyParamCaption}\item[{const \hyperlink{namespace_ogre_af73bbdc8bed8a3e6fcd56bb8fa188c45}{Ogre\+::\+String} \&}]{subdir }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [inline]}}



Creates a concrete platform-\/dependent implementation of \hyperlink{class_ogre_1_1_file_system_layer}{File\+System\+Layer}. 


\begin{DoxyParams}{Parameters}
{\em subdir} & A subdirectory inside the user\textquotesingle{}s path to distinguish between different \hyperlink{namespace_ogre}{Ogre} releases. \\
\hline
\end{DoxyParams}


\subsection{Member Function Documentation}
\mbox{\Hypertarget{class_ogre_1_1_file_system_layer_a7af51345a08a299fde4ec672b00ce9f8}\label{class_ogre_1_1_file_system_layer_a7af51345a08a299fde4ec672b00ce9f8}} 
\index{Ogre\+::\+File\+System\+Layer@{Ogre\+::\+File\+System\+Layer}!get\+Config\+File\+Path@{get\+Config\+File\+Path}}
\index{get\+Config\+File\+Path@{get\+Config\+File\+Path}!Ogre\+::\+File\+System\+Layer@{Ogre\+::\+File\+System\+Layer}}
\subsubsection{\texorpdfstring{get\+Config\+File\+Path()}{getConfigFilePath()}}
{\footnotesize\ttfamily \hyperlink{namespace_ogre_af73bbdc8bed8a3e6fcd56bb8fa188c45}{Ogre\+::\+String} Ogre\+::\+File\+System\+Layer\+::get\+Config\+File\+Path (\begin{DoxyParamCaption}\item[{\hyperlink{namespace_ogre_af73bbdc8bed8a3e6fcd56bb8fa188c45}{Ogre\+::\+String}}]{filename }\end{DoxyParamCaption}) const\hspace{0.3cm}{\ttfamily [inline]}}



Search for the given config file in the user\textquotesingle{}s home path. 

If it can\textquotesingle{}t be found there, the function falls back to the system-\/wide install path for \hyperlink{namespace_ogre}{Ogre} config files. (Usually the same place where the Sample\+Browser resides, or a special config path above that path.) 
\begin{DoxyParams}{Parameters}
{\em filename} & The config file name (without path) \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
The full path to the config file. 
\end{DoxyReturn}


References O\+G\+R\+E\+\_\+\+B\+U\+I\+L\+D\+\_\+\+S\+U\+F\+F\+IX.

\mbox{\Hypertarget{class_ogre_1_1_file_system_layer_a0e606f77e2deb5961b8001cbdfe35e22}\label{class_ogre_1_1_file_system_layer_a0e606f77e2deb5961b8001cbdfe35e22}} 
\index{Ogre\+::\+File\+System\+Layer@{Ogre\+::\+File\+System\+Layer}!get\+Writable\+Path@{get\+Writable\+Path}}
\index{get\+Writable\+Path@{get\+Writable\+Path}!Ogre\+::\+File\+System\+Layer@{Ogre\+::\+File\+System\+Layer}}
\subsubsection{\texorpdfstring{get\+Writable\+Path()}{getWritablePath()}}
{\footnotesize\ttfamily \hyperlink{namespace_ogre_af73bbdc8bed8a3e6fcd56bb8fa188c45}{Ogre\+::\+String} Ogre\+::\+File\+System\+Layer\+::get\+Writable\+Path (\begin{DoxyParamCaption}\item[{const \hyperlink{namespace_ogre_af73bbdc8bed8a3e6fcd56bb8fa188c45}{Ogre\+::\+String} \&}]{filename }\end{DoxyParamCaption}) const\hspace{0.3cm}{\ttfamily [inline]}}



Find a path where the given filename can be written to. 

This path will usually be in the user\textquotesingle{}s home directory. This function should be used for any output like logs and graphics settings. 
\begin{DoxyParams}{Parameters}
{\em filename} & Name of the file. \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
The full path to a writable location for the given filename. 
\end{DoxyReturn}
\mbox{\Hypertarget{class_ogre_1_1_file_system_layer_aa2ab8206fdc0f858fbe27e94e3297dbf}\label{class_ogre_1_1_file_system_layer_aa2ab8206fdc0f858fbe27e94e3297dbf}} 
\index{Ogre\+::\+File\+System\+Layer@{Ogre\+::\+File\+System\+Layer}!set\+Config\+Paths@{set\+Config\+Paths}}
\index{set\+Config\+Paths@{set\+Config\+Paths}!Ogre\+::\+File\+System\+Layer@{Ogre\+::\+File\+System\+Layer}}
\subsubsection{\texorpdfstring{set\+Config\+Paths()}{setConfigPaths()}}
{\footnotesize\ttfamily void Ogre\+::\+File\+System\+Layer\+::set\+Config\+Paths (\begin{DoxyParamCaption}\item[{const \hyperlink{group___general_ga783e5227595f351519627abfb740ec85}{Ogre\+::\+String\+Vector} \&}]{paths }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [inline]}}

\mbox{\Hypertarget{class_ogre_1_1_file_system_layer_afeaaf6f11cd5722e589a4c793d5a98cb}\label{class_ogre_1_1_file_system_layer_afeaaf6f11cd5722e589a4c793d5a98cb}} 
\index{Ogre\+::\+File\+System\+Layer@{Ogre\+::\+File\+System\+Layer}!set\+Home\+Path@{set\+Home\+Path}}
\index{set\+Home\+Path@{set\+Home\+Path}!Ogre\+::\+File\+System\+Layer@{Ogre\+::\+File\+System\+Layer}}
\subsubsection{\texorpdfstring{set\+Home\+Path()}{setHomePath()}}
{\footnotesize\ttfamily void Ogre\+::\+File\+System\+Layer\+::set\+Home\+Path (\begin{DoxyParamCaption}\item[{const \hyperlink{namespace_ogre_af73bbdc8bed8a3e6fcd56bb8fa188c45}{Ogre\+::\+String} \&}]{path }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [inline]}}

\mbox{\Hypertarget{class_ogre_1_1_file_system_layer_a16c94bbb670ff33107cc568b73edae40}\label{class_ogre_1_1_file_system_layer_a16c94bbb670ff33107cc568b73edae40}} 
\index{Ogre\+::\+File\+System\+Layer@{Ogre\+::\+File\+System\+Layer}!resolve\+Bundle\+Path@{resolve\+Bundle\+Path}}
\index{resolve\+Bundle\+Path@{resolve\+Bundle\+Path}!Ogre\+::\+File\+System\+Layer@{Ogre\+::\+File\+System\+Layer}}
\subsubsection{\texorpdfstring{resolve\+Bundle\+Path()}{resolveBundlePath()}}
{\footnotesize\ttfamily static \hyperlink{namespace_ogre_af73bbdc8bed8a3e6fcd56bb8fa188c45}{String} Ogre\+::\+File\+System\+Layer\+::resolve\+Bundle\+Path (\begin{DoxyParamCaption}\item[{\hyperlink{namespace_ogre_af73bbdc8bed8a3e6fcd56bb8fa188c45}{String}}]{path }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [static]}}



Resolve path inside the application bundle on some platforms \hyperlink{namespace_ogre}{Ogre} is delivered as an application bundle this function resolves the given path such that it points inside that bundle. 


\begin{DoxyParams}{Parameters}
{\em path} & \\
\hline
\end{DoxyParams}
\begin{DoxyReturn}{Returns}
path inside the bundle 
\end{DoxyReturn}
\mbox{\Hypertarget{class_ogre_1_1_file_system_layer_a0a2d92288292403038f30364043ee753}\label{class_ogre_1_1_file_system_layer_a0a2d92288292403038f30364043ee753}} 
\index{Ogre\+::\+File\+System\+Layer@{Ogre\+::\+File\+System\+Layer}!create\+Directory@{create\+Directory}}
\index{create\+Directory@{create\+Directory}!Ogre\+::\+File\+System\+Layer@{Ogre\+::\+File\+System\+Layer}}
\subsubsection{\texorpdfstring{create\+Directory()}{createDirectory()}}
{\footnotesize\ttfamily static bool Ogre\+::\+File\+System\+Layer\+::create\+Directory (\begin{DoxyParamCaption}\item[{const \hyperlink{namespace_ogre_af73bbdc8bed8a3e6fcd56bb8fa188c45}{Ogre\+::\+String} \&}]{name }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [static]}}



Create a directory. 

\mbox{\Hypertarget{class_ogre_1_1_file_system_layer_a2fa242f9327be916ac34f699464698af}\label{class_ogre_1_1_file_system_layer_a2fa242f9327be916ac34f699464698af}} 
\index{Ogre\+::\+File\+System\+Layer@{Ogre\+::\+File\+System\+Layer}!remove\+Directory@{remove\+Directory}}
\index{remove\+Directory@{remove\+Directory}!Ogre\+::\+File\+System\+Layer@{Ogre\+::\+File\+System\+Layer}}
\subsubsection{\texorpdfstring{remove\+Directory()}{removeDirectory()}}
{\footnotesize\ttfamily static bool Ogre\+::\+File\+System\+Layer\+::remove\+Directory (\begin{DoxyParamCaption}\item[{const \hyperlink{namespace_ogre_af73bbdc8bed8a3e6fcd56bb8fa188c45}{Ogre\+::\+String} \&}]{name }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [static]}}



Delete a directory. 

Should be empty \mbox{\Hypertarget{class_ogre_1_1_file_system_layer_a6566c95649770d52628853f5dfcf8ea6}\label{class_ogre_1_1_file_system_layer_a6566c95649770d52628853f5dfcf8ea6}} 
\index{Ogre\+::\+File\+System\+Layer@{Ogre\+::\+File\+System\+Layer}!file\+Exists@{file\+Exists}}
\index{file\+Exists@{file\+Exists}!Ogre\+::\+File\+System\+Layer@{Ogre\+::\+File\+System\+Layer}}
\subsubsection{\texorpdfstring{file\+Exists()}{fileExists()}}
{\footnotesize\ttfamily static bool Ogre\+::\+File\+System\+Layer\+::file\+Exists (\begin{DoxyParamCaption}\item[{const \hyperlink{namespace_ogre_af73bbdc8bed8a3e6fcd56bb8fa188c45}{Ogre\+::\+String} \&}]{path }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [static]}}



Test if the given file exists. 

\mbox{\Hypertarget{class_ogre_1_1_file_system_layer_a1fecc5387500843ef0c0c0b732824206}\label{class_ogre_1_1_file_system_layer_a1fecc5387500843ef0c0c0b732824206}} 
\index{Ogre\+::\+File\+System\+Layer@{Ogre\+::\+File\+System\+Layer}!remove\+File@{remove\+File}}
\index{remove\+File@{remove\+File}!Ogre\+::\+File\+System\+Layer@{Ogre\+::\+File\+System\+Layer}}
\subsubsection{\texorpdfstring{remove\+File()}{removeFile()}}
{\footnotesize\ttfamily static bool Ogre\+::\+File\+System\+Layer\+::remove\+File (\begin{DoxyParamCaption}\item[{const \hyperlink{namespace_ogre_af73bbdc8bed8a3e6fcd56bb8fa188c45}{Ogre\+::\+String} \&}]{path }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [static]}}



Delete a file. 

\mbox{\Hypertarget{class_ogre_1_1_file_system_layer_a09fa0a7da021d71cd7b6e2982d52effc}\label{class_ogre_1_1_file_system_layer_a09fa0a7da021d71cd7b6e2982d52effc}} 
\index{Ogre\+::\+File\+System\+Layer@{Ogre\+::\+File\+System\+Layer}!rename\+File@{rename\+File}}
\index{rename\+File@{rename\+File}!Ogre\+::\+File\+System\+Layer@{Ogre\+::\+File\+System\+Layer}}
\subsubsection{\texorpdfstring{rename\+File()}{renameFile()}}
{\footnotesize\ttfamily static bool Ogre\+::\+File\+System\+Layer\+::rename\+File (\begin{DoxyParamCaption}\item[{const \hyperlink{namespace_ogre_af73bbdc8bed8a3e6fcd56bb8fa188c45}{Ogre\+::\+String} \&}]{oldpath,  }\item[{const \hyperlink{namespace_ogre_af73bbdc8bed8a3e6fcd56bb8fa188c45}{Ogre\+::\+String} \&}]{newpath }\end{DoxyParamCaption})\hspace{0.3cm}{\ttfamily [static]}}



Rename a file. 



The documentation for this class was generated from the following file\+:\begin{DoxyCompactItemize}
\item 
\hyperlink{_ogre_file_system_layer_8h}{Ogre\+File\+System\+Layer.\+h}\end{DoxyCompactItemize}
