<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1"> <title>Directories, files, and file names</title> <link href="doxygen.css" rel="stylesheet" type="text/css"> <link href="tabs.css" rel="stylesheet" type="text/css"> </head><body> <div align="left"><a href="http://www.mrpt.org/">Main MRPT website</a> > <b>C++ reference</b> </div> <div align="right"> <a href="index.html"><img border="0" src="mrpt_logo.png" alt="MRPT logo"></a> </div> <!-- Generated by Doxygen 1.7.5 --> <script type="text/javascript"> var searchBox = new SearchBox("searchBox", "search",false,'Search'); </script> <div id="navrow1" class="tabs"> <ul class="tablist"> <li><a href="index.html"><span>Main Page</span></a></li> <li><a href="pages.html"><span>Related Pages</span></a></li> <li><a href="modules.html"><span>Modules</span></a></li> <li><a href="namespaces.html"><span>Namespaces</span></a></li> <li><a href="annotated.html"><span>Classes</span></a></li> <li><a href="files.html"><span>Files</span></a></li> <li> <div id="MSearchBox" class="MSearchBoxInactive"> <div class="left"> <form id="FSearchBox" action="search.php" method="get"> <img id="MSearchSelect" src="search/mag.png" alt=""/> <input type="text" id="MSearchField" name="query" value="Search" size="20" accesskey="S" onfocus="searchBox.OnSearchFieldFocus(true)" onblur="searchBox.OnSearchFieldFocus(false)"/> </form> </div><div class="right"></div> </div> </li> </ul> </div> </div> <div class="header"> <div class="summary"> <a href="#func-members">Functions</a> </div> <div class="headertitle"> <div class="title">Directories, files, and file names</div> </div> <div class="ingroups"><a class="el" href="group__mrpt__base__grp.html">[mrpt-base]</a></div></div> <div class="contents"> <div class="dynheader"> Collaboration diagram for Directories, files, and file names:</div> <div class="dyncontent"> <center><table><tr><td><img src="group__filesystem.png" border="0" alt="" usemap="#group____filesystem"/> <map name="group____filesystem" id="group____filesystem"> <area shape="rect" id="node2" href="group__mrpt__base__grp.html" title=" Back to list of all libraries | See all modules   " alt="" coords="5,5,93,32"/></map> </td></tr></table></center> </div> <table class="memberdecls"> <tr><td colspan="2"><h2><a name="func-members"></a> Functions</h2></td></tr> <tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="classstd_1_1string.html">std::string</a> BASE_IMPEXP </td><td class="memItemRight" valign="bottom"><a class="el" href="group__filesystem.html#ga82325926b9a2b34801d64f9c7f38d24f">mrpt::system::getTempFileName</a> ()</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Returns the name of a proposed temporary file name. <a href="#ga82325926b9a2b34801d64f9c7f38d24f"></a><br/></td></tr> <tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="classstd_1_1string.html">std::string</a> BASE_IMPEXP </td><td class="memItemRight" valign="bottom"><a class="el" href="group__filesystem.html#ga0f47381c1931e6ece35e41f944bdebb1">mrpt::system::getcwd</a> ()</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Returns the current working directory. <a href="#ga0f47381c1931e6ece35e41f944bdebb1"></a><br/></td></tr> <tr><td class="memItemLeft" align="right" valign="top">bool BASE_IMPEXP </td><td class="memItemRight" valign="bottom"><a class="el" href="group__filesystem.html#gaa435b18007a6fca5d14ccdf6fc650492">mrpt::system::createDirectory</a> (const <a class="el" href="classstd_1_1string.html">std::string</a> &dirName)</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Creates a directory. <a href="#gaa435b18007a6fca5d14ccdf6fc650492"></a><br/></td></tr> <tr><td class="memItemLeft" align="right" valign="top">bool BASE_IMPEXP </td><td class="memItemRight" valign="bottom"><a class="el" href="group__filesystem.html#ga8eb9af5a17fde6c308953303f70e4093">mrpt::system::deleteFile</a> (const <a class="el" href="classstd_1_1string.html">std::string</a> &fileName)</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Deletes a single file. <a href="#ga8eb9af5a17fde6c308953303f70e4093"></a><br/></td></tr> <tr><td class="memItemLeft" align="right" valign="top">void BASE_IMPEXP </td><td class="memItemRight" valign="bottom"><a class="el" href="group__filesystem.html#ga71cc493ee11ab1729522a90fb5478c2d">mrpt::system::deleteFiles</a> (const <a class="el" href="classstd_1_1string.html">std::string</a> &s)</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Delete one or more files, especified by the (optional) path and the file name (including '?' or '*') - Use forward slash ('/') for directories for compatibility between Windows and Linux, since they will be internally traslated into backward slashes ('\') if MRPT is compiled under Windows. <a href="#ga71cc493ee11ab1729522a90fb5478c2d"></a><br/></td></tr> <tr><td class="memItemLeft" align="right" valign="top">bool BASE_IMPEXP </td><td class="memItemRight" valign="bottom"><a class="el" href="group__filesystem.html#ga26758c4304f3caec1e58d9382c173e40">mrpt::system::renameFile</a> (const <a class="el" href="classstd_1_1string.html">std::string</a> &oldFileName, const <a class="el" href="classstd_1_1string.html">std::string</a> &newFileName, <a class="el" href="classstd_1_1string.html">std::string</a> *error_msg=NULL)</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Renames a file - If the target path is different and the filesystem allows it, it will be moved to the new location. <a href="#ga26758c4304f3caec1e58d9382c173e40"></a><br/></td></tr> <tr><td class="memItemLeft" align="right" valign="top">bool BASE_IMPEXP </td><td class="memItemRight" valign="bottom"><a class="el" href="group__filesystem.html#ga076a37d5291251595fef9a49c1f3fd46">mrpt::system::deleteFilesInDirectory</a> (const <a class="el" href="classstd_1_1string.html">std::string</a> &s, bool deleteDirectoryAsWell=false)</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Delete all the files in a given directory (nothing done if directory does not exists, or path is a file). <a href="#ga076a37d5291251595fef9a49c1f3fd46"></a><br/></td></tr> <tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="classstd_1_1string.html">std::string</a> BASE_IMPEXP </td><td class="memItemRight" valign="bottom"><a class="el" href="group__filesystem.html#ga89b806814023cd0411a99d6cb4d54ea9">mrpt::system::extractFileName</a> (const <a class="el" href="classstd_1_1string.html">std::string</a> &filePath)</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Extract just the name (without extension) of a filename from a complete path plus name plus extension. <a href="#ga89b806814023cd0411a99d6cb4d54ea9"></a><br/></td></tr> <tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="classstd_1_1string.html">std::string</a> BASE_IMPEXP </td><td class="memItemRight" valign="bottom"><a class="el" href="group__filesystem.html#gac857ed6d7bd5a5d17c3ab8fc249e8cfa">mrpt::system::extractFileExtension</a> (const <a class="el" href="classstd_1_1string.html">std::string</a> &filePath, bool ignore_gz=false)</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Extract the extension of a filename. <a href="#gac857ed6d7bd5a5d17c3ab8fc249e8cfa"></a><br/></td></tr> <tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="classstd_1_1string.html">std::string</a> BASE_IMPEXP </td><td class="memItemRight" valign="bottom"><a class="el" href="group__filesystem.html#ga15e372b32fef4d2135e0d2d96adb766e">mrpt::system::extractFileDirectory</a> (const <a class="el" href="classstd_1_1string.html">std::string</a> &filePath)</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Extract the whole path (the directory) of a filename from a complete path plus name plus extension. <a href="#ga15e372b32fef4d2135e0d2d96adb766e"></a><br/></td></tr> <tr><td class="memItemLeft" align="right" valign="top">bool BASE_IMPEXP </td><td class="memItemRight" valign="bottom"><a class="el" href="group__filesystem.html#gaa233b191fefbf42cf4d06bce65d2ccc2">mrpt::system::fileExists</a> (const <a class="el" href="classstd_1_1string.html">std::string</a> &fileName)</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Test if a given file (or directory) exists. <a href="#gaa233b191fefbf42cf4d06bce65d2ccc2"></a><br/></td></tr> <tr><td class="memItemLeft" align="right" valign="top">bool BASE_IMPEXP </td><td class="memItemRight" valign="bottom"><a class="el" href="group__filesystem.html#ga0a8ee608bba288dbb2ad2b93e0bf91e9">mrpt::system::directoryExists</a> (const <a class="el" href="classstd_1_1string.html">std::string</a> &fileName)</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Test if a given directory exists (it fails if the given path refers to an existing file). <a href="#ga0a8ee608bba288dbb2ad2b93e0bf91e9"></a><br/></td></tr> <tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="classstd_1_1string.html">std::string</a> BASE_IMPEXP </td><td class="memItemRight" valign="bottom"><a class="el" href="group__filesystem.html#ga3ab2bd0ae86710964f38febf2827ba2f">mrpt::system::fileNameStripInvalidChars</a> (const <a class="el" href="classstd_1_1string.html">std::string</a> &filename)</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Replace invalid filename chars by underscores ('_'). <a href="#ga3ab2bd0ae86710964f38febf2827ba2f"></a><br/></td></tr> <tr><td class="memItemLeft" align="right" valign="top"><a class="el" href="classstd_1_1string.html">std::string</a> BASE_IMPEXP </td><td class="memItemRight" valign="bottom"><a class="el" href="group__filesystem.html#ga603f2e4e59b427db27526a1ffbd26ae2">mrpt::system::fileNameChangeExtension</a> (const <a class="el" href="classstd_1_1string.html">std::string</a> &filename, const <a class="el" href="classstd_1_1string.html">std::string</a> &newExtension)</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Replace the filename extension by another one. <a href="#ga603f2e4e59b427db27526a1ffbd26ae2"></a><br/></td></tr> <tr><td class="memItemLeft" align="right" valign="top">uint64_t BASE_IMPEXP </td><td class="memItemRight" valign="bottom"><a class="el" href="group__filesystem.html#ga7f6b64000fa073fc067c67ee0f9aaad5">mrpt::system::getFileSize</a> (const <a class="el" href="classstd_1_1string.html">std::string</a> &fileName)</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Return the size of the given file, or size_t(-1) if some error is found accessing that file. <a href="#ga7f6b64000fa073fc067c67ee0f9aaad5"></a><br/></td></tr> </table> <hr/><h2>Function Documentation</h2> <a class="anchor" id="gaa435b18007a6fca5d14ccdf6fc650492"></a><!-- doxytag: member="mrpt::system::createDirectory" ref="gaa435b18007a6fca5d14ccdf6fc650492" args="(const std::string &dirName)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">bool BASE_IMPEXP mrpt::system::createDirectory </td> <td>(</td> <td class="paramtype">const <a class="el" href="classstd_1_1string.html">std::string</a> & </td> <td class="paramname"><em>dirName</em></td><td>)</td> <td></td> </tr> </table> </div> <div class="memdoc"> <p>Creates a directory. </p> <dl class="return"><dt><b>Returns:</b></dt><dd>Returns false on any error, true on everything OK. </dd></dl> <dl class="todo"><dt><b><a class="el" href="todo.html#_todo000001">Todo:</a></b></dt><dd>Seems to return false on Linux even after creating the directory OK. </dd></dl> </div> </div> <a class="anchor" id="ga8eb9af5a17fde6c308953303f70e4093"></a><!-- doxytag: member="mrpt::system::deleteFile" ref="ga8eb9af5a17fde6c308953303f70e4093" args="(const std::string &fileName)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">bool BASE_IMPEXP mrpt::system::deleteFile </td> <td>(</td> <td class="paramtype">const <a class="el" href="classstd_1_1string.html">std::string</a> & </td> <td class="paramname"><em>fileName</em></td><td>)</td> <td></td> </tr> </table> </div> <div class="memdoc"> <p>Deletes a single file. </p> <p>For multiple files see deleteFiles </p> <dl class="return"><dt><b>Returns:</b></dt><dd>Returns false on any error, true on everything OK. </dd></dl> <dl class="see"><dt><b>See also:</b></dt><dd><a class="el" href="group__filesystem.html#ga71cc493ee11ab1729522a90fb5478c2d" title="Delete one or more files, especified by the (optional) path and the file name (including '...">deleteFiles</a> </dd></dl> </div> </div> <a class="anchor" id="ga71cc493ee11ab1729522a90fb5478c2d"></a><!-- doxytag: member="mrpt::system::deleteFiles" ref="ga71cc493ee11ab1729522a90fb5478c2d" args="(const std::string &s)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">void BASE_IMPEXP mrpt::system::deleteFiles </td> <td>(</td> <td class="paramtype">const <a class="el" href="classstd_1_1string.html">std::string</a> & </td> <td class="paramname"><em>s</em></td><td>)</td> <td></td> </tr> </table> </div> <div class="memdoc"> <p>Delete one or more files, especified by the (optional) path and the file name (including '?' or '*') - Use forward slash ('/') for directories for compatibility between Windows and Linux, since they will be internally traslated into backward slashes ('\') if MRPT is compiled under Windows. </p> <dl class="see"><dt><b>See also:</b></dt><dd><a class="el" href="group__filesystem.html#ga8eb9af5a17fde6c308953303f70e4093" title="Deletes a single file.">deleteFile</a> </dd></dl> </div> </div> <a class="anchor" id="ga076a37d5291251595fef9a49c1f3fd46"></a><!-- doxytag: member="mrpt::system::deleteFilesInDirectory" ref="ga076a37d5291251595fef9a49c1f3fd46" args="(const std::string &s, bool deleteDirectoryAsWell=false)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">bool BASE_IMPEXP mrpt::system::deleteFilesInDirectory </td> <td>(</td> <td class="paramtype">const <a class="el" href="classstd_1_1string.html">std::string</a> & </td> <td class="paramname"><em>s</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">bool </td> <td class="paramname"><em>deleteDirectoryAsWell</em> = <code>false</code> </td> </tr> <tr> <td></td> <td>)</td> <td></td><td></td> </tr> </table> </div> <div class="memdoc"> <p>Delete all the files in a given directory (nothing done if directory does not exists, or path is a file). </p> <dl class="see"><dt><b>See also:</b></dt><dd><a class="el" href="group__filesystem.html#ga8eb9af5a17fde6c308953303f70e4093" title="Deletes a single file.">deleteFile</a> </dd></dl> <dl class="return"><dt><b>Returns:</b></dt><dd>true on success </dd></dl> </div> </div> <a class="anchor" id="ga0a8ee608bba288dbb2ad2b93e0bf91e9"></a><!-- doxytag: member="mrpt::system::directoryExists" ref="ga0a8ee608bba288dbb2ad2b93e0bf91e9" args="(const std::string &fileName)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">bool BASE_IMPEXP mrpt::system::directoryExists </td> <td>(</td> <td class="paramtype">const <a class="el" href="classstd_1_1string.html">std::string</a> & </td> <td class="paramname"><em>fileName</em></td><td>)</td> <td></td> </tr> </table> </div> <div class="memdoc"> <p>Test if a given directory exists (it fails if the given path refers to an existing file). </p> <dl class="see"><dt><b>See also:</b></dt><dd><a class="el" href="group__filesystem.html#gaa233b191fefbf42cf4d06bce65d2ccc2" title="Test if a given file (or directory) exists.">fileExists</a> </dd></dl> </div> </div> <a class="anchor" id="ga15e372b32fef4d2135e0d2d96adb766e"></a><!-- doxytag: member="mrpt::system::extractFileDirectory" ref="ga15e372b32fef4d2135e0d2d96adb766e" args="(const std::string &filePath)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname"><a class="el" href="classstd_1_1string.html">std::string</a> BASE_IMPEXP mrpt::system::extractFileDirectory </td> <td>(</td> <td class="paramtype">const <a class="el" href="classstd_1_1string.html">std::string</a> & </td> <td class="paramname"><em>filePath</em></td><td>)</td> <td></td> </tr> </table> </div> <div class="memdoc"> <p>Extract the whole path (the directory) of a filename from a complete path plus name plus extension. </p> <p>This function works for either "/" or "\" directory separators. </p> <dl class="see"><dt><b>See also:</b></dt><dd><a class="el" href="group__filesystem.html#ga89b806814023cd0411a99d6cb4d54ea9" title="Extract just the name (without extension) of a filename from a complete path plus name plus extension...">extractFileName</a>,<a class="el" href="group__filesystem.html#gac857ed6d7bd5a5d17c3ab8fc249e8cfa" title="Extract the extension of a filename.">extractFileExtension</a> </dd></dl> </div> </div> <a class="anchor" id="gac857ed6d7bd5a5d17c3ab8fc249e8cfa"></a><!-- doxytag: member="mrpt::system::extractFileExtension" ref="gac857ed6d7bd5a5d17c3ab8fc249e8cfa" args="(const std::string &filePath, bool ignore_gz=false)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname"><a class="el" href="classstd_1_1string.html">std::string</a> BASE_IMPEXP mrpt::system::extractFileExtension </td> <td>(</td> <td class="paramtype">const <a class="el" href="classstd_1_1string.html">std::string</a> & </td> <td class="paramname"><em>filePath</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">bool </td> <td class="paramname"><em>ignore_gz</em> = <code>false</code> </td> </tr> <tr> <td></td> <td>)</td> <td></td><td></td> </tr> </table> </div> <div class="memdoc"> <p>Extract the extension of a filename. </p> <p>For example, for "dummy.cpp", it will return "cpp". If "ignore_gz" is true, the second extension will be returned if the file name ends in ".gz", for example, for "foo.map.gz", this will return "map". </p> <dl class="see"><dt><b>See also:</b></dt><dd><a class="el" href="group__filesystem.html#ga89b806814023cd0411a99d6cb4d54ea9" title="Extract just the name (without extension) of a filename from a complete path plus name plus extension...">extractFileName</a>,<a class="el" href="group__filesystem.html#ga15e372b32fef4d2135e0d2d96adb766e" title="Extract the whole path (the directory) of a filename from a complete path plus name plus extension...">extractFileDirectory</a> </dd></dl> </div> </div> <a class="anchor" id="ga89b806814023cd0411a99d6cb4d54ea9"></a><!-- doxytag: member="mrpt::system::extractFileName" ref="ga89b806814023cd0411a99d6cb4d54ea9" args="(const std::string &filePath)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname"><a class="el" href="classstd_1_1string.html">std::string</a> BASE_IMPEXP mrpt::system::extractFileName </td> <td>(</td> <td class="paramtype">const <a class="el" href="classstd_1_1string.html">std::string</a> & </td> <td class="paramname"><em>filePath</em></td><td>)</td> <td></td> </tr> </table> </div> <div class="memdoc"> <p>Extract just the name (without extension) of a filename from a complete path plus name plus extension. </p> <p>This function works for either "/" or "\" directory separators. </p> <dl class="see"><dt><b>See also:</b></dt><dd><a class="el" href="group__filesystem.html#gac857ed6d7bd5a5d17c3ab8fc249e8cfa" title="Extract the extension of a filename.">extractFileExtension</a>,<a class="el" href="group__filesystem.html#ga15e372b32fef4d2135e0d2d96adb766e" title="Extract the whole path (the directory) of a filename from a complete path plus name plus extension...">extractFileDirectory</a> </dd></dl> </div> </div> <a class="anchor" id="gaa233b191fefbf42cf4d06bce65d2ccc2"></a><!-- doxytag: member="mrpt::system::fileExists" ref="gaa233b191fefbf42cf4d06bce65d2ccc2" args="(const std::string &fileName)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">bool BASE_IMPEXP mrpt::system::fileExists </td> <td>(</td> <td class="paramtype">const <a class="el" href="classstd_1_1string.html">std::string</a> & </td> <td class="paramname"><em>fileName</em></td><td>)</td> <td></td> </tr> </table> </div> <div class="memdoc"> <p>Test if a given file (or directory) exists. </p> <dl class="see"><dt><b>See also:</b></dt><dd><a class="el" href="group__filesystem.html#ga0a8ee608bba288dbb2ad2b93e0bf91e9" title="Test if a given directory exists (it fails if the given path refers to an existing file)...">directoryExists</a> </dd></dl> </div> </div> <a class="anchor" id="ga603f2e4e59b427db27526a1ffbd26ae2"></a><!-- doxytag: member="mrpt::system::fileNameChangeExtension" ref="ga603f2e4e59b427db27526a1ffbd26ae2" args="(const std::string &filename, const std::string &newExtension)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname"><a class="el" href="classstd_1_1string.html">std::string</a> BASE_IMPEXP mrpt::system::fileNameChangeExtension </td> <td>(</td> <td class="paramtype">const <a class="el" href="classstd_1_1string.html">std::string</a> & </td> <td class="paramname"><em>filename</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">const <a class="el" href="classstd_1_1string.html">std::string</a> & </td> <td class="paramname"><em>newExtension</em> </td> </tr> <tr> <td></td> <td>)</td> <td></td><td></td> </tr> </table> </div> <div class="memdoc"> <p>Replace the filename extension by another one. </p> <p>Example: </p> <div class="fragment"><pre class="fragment"> <a class="code" href="group__filesystem.html#ga603f2e4e59b427db27526a1ffbd26ae2" title="Replace the filename extension by another one.">fileNameChangeExtension</a>(<span class="stringliteral">"cool.txt"</span>,<span class="stringliteral">"bar"</span>) <span class="comment">// -> "cool.bar"</span> </pre></div> </div> </div> <a class="anchor" id="ga3ab2bd0ae86710964f38febf2827ba2f"></a><!-- doxytag: member="mrpt::system::fileNameStripInvalidChars" ref="ga3ab2bd0ae86710964f38febf2827ba2f" args="(const std::string &filename)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname"><a class="el" href="classstd_1_1string.html">std::string</a> BASE_IMPEXP mrpt::system::fileNameStripInvalidChars </td> <td>(</td> <td class="paramtype">const <a class="el" href="classstd_1_1string.html">std::string</a> & </td> <td class="paramname"><em>filename</em></td><td>)</td> <td></td> </tr> </table> </div> <div class="memdoc"> <p>Replace invalid filename chars by underscores ('_'). </p> <p>Invalid chars are identified by those not being alphanumeric or: ".-#%$&()+[]{}" </p> </div> </div> <a class="anchor" id="ga0f47381c1931e6ece35e41f944bdebb1"></a><!-- doxytag: member="mrpt::system::getcwd" ref="ga0f47381c1931e6ece35e41f944bdebb1" args="()" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname"><a class="el" href="classstd_1_1string.html">std::string</a> BASE_IMPEXP mrpt::system::getcwd </td> <td>(</td> <td class="paramname"></td><td>)</td> <td></td> </tr> </table> </div> <div class="memdoc"> <p>Returns the current working directory. </p> </div> </div> <a class="anchor" id="ga7f6b64000fa073fc067c67ee0f9aaad5"></a><!-- doxytag: member="mrpt::system::getFileSize" ref="ga7f6b64000fa073fc067c67ee0f9aaad5" args="(const std::string &fileName)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">uint64_t BASE_IMPEXP mrpt::system::getFileSize </td> <td>(</td> <td class="paramtype">const <a class="el" href="classstd_1_1string.html">std::string</a> & </td> <td class="paramname"><em>fileName</em></td><td>)</td> <td></td> </tr> </table> </div> <div class="memdoc"> <p>Return the size of the given file, or size_t(-1) if some error is found accessing that file. </p> </div> </div> <a class="anchor" id="ga82325926b9a2b34801d64f9c7f38d24f"></a><!-- doxytag: member="mrpt::system::getTempFileName" ref="ga82325926b9a2b34801d64f9c7f38d24f" args="()" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname"><a class="el" href="classstd_1_1string.html">std::string</a> BASE_IMPEXP mrpt::system::getTempFileName </td> <td>(</td> <td class="paramname"></td><td>)</td> <td></td> </tr> </table> </div> <div class="memdoc"> <p>Returns the name of a proposed temporary file name. </p> </div> </div> <a class="anchor" id="ga26758c4304f3caec1e58d9382c173e40"></a><!-- doxytag: member="mrpt::system::renameFile" ref="ga26758c4304f3caec1e58d9382c173e40" args="(const std::string &oldFileName, const std::string &newFileName, std::string *error_msg=NULL)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">bool BASE_IMPEXP mrpt::system::renameFile </td> <td>(</td> <td class="paramtype">const <a class="el" href="classstd_1_1string.html">std::string</a> & </td> <td class="paramname"><em>oldFileName</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">const <a class="el" href="classstd_1_1string.html">std::string</a> & </td> <td class="paramname"><em>newFileName</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype"><a class="el" href="classstd_1_1string.html">std::string</a> * </td> <td class="paramname"><em>error_msg</em> = <code>NULL</code> </td> </tr> <tr> <td></td> <td>)</td> <td></td><td></td> </tr> </table> </div> <div class="memdoc"> <p>Renames a file - If the target path is different and the filesystem allows it, it will be moved to the new location. </p> <dl class="return"><dt><b>Returns:</b></dt><dd>false on any error. In that case, if a pointer to a receiver string is passed in error_msg, a description of the error is saved there. </dd></dl> </div> </div> </div> <br><hr><br> <table border="0" width="100%"> <tr> <td> Page generated by <a href="http://www.doxygen.org" target="_blank">Doxygen 1.7.5</a> for MRPT 0.9.5 SVN: at Sun Sep 25 17:20:18 UTC 2011</td><td></td> <td width="100"> </td> <td width="150"> </td></tr> </table> </body></html>