<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/> <title>Vidalia: file.h File Reference</title> <link href="tabs.css" rel="stylesheet" type="text/css"/> <link href="doxygen.css" rel="stylesheet" type="text/css"/> </head> <body> <!-- Generated by Doxygen 1.6.3 --> <div class="navigation" id="top"> <div class="tabs"> <ul> <li><a href="index.html"><span>Main Page</span></a></li> <li><a href="namespaces.html"><span>Namespaces</span></a></li> <li><a href="annotated.html"><span>Classes</span></a></li> <li class="current"><a href="files.html"><span>Files</span></a></li> <li><a href="dirs.html"><span>Directories</span></a></li> </ul> </div> <div class="tabs"> <ul> <li><a href="files.html"><span>File List</span></a></li> <li><a href="globals.html"><span>File Members</span></a></li> </ul> </div> <div class="navpath"><a class="el" href="dir_b47abd1aad201a152869566145babb61.html">src</a> » <a class="el" href="dir_3459d97d61361c9d41d467fba45f9c61.html">common</a> </div> </div> <div class="contents"> <h1>file.h File Reference</h1><code>#include <QString></code><br/> <p><a href="file_8h_source.html">Go to the source code of this file.</a></p> <table border="0" cellpadding="0" cellspacing="0"> <tr><td colspan="2"><h2>Functions</h2></td></tr> <tr><td class="memItemLeft" align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><a class="el" href="file_8h.html#a61bc27b5a127db67fdccb95e3a659c97">touch_file</a> (const QString &filename, bool createdir=false, QString *errmsg=0)</td></tr> <tr><td class="memItemLeft" align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><a class="el" href="file_8h.html#ae15354f79a89888da691222de003851f">create_path</a> (const QString &path)</td></tr> <tr><td class="memItemLeft" align="right" valign="top">QString </td><td class="memItemRight" valign="bottom"><a class="el" href="file_8h.html#aaa3960262cc91df6d2400eb7ba888ae5">expand_filename</a> (const QString &filename)</td></tr> <tr><td class="memItemLeft" align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><a class="el" href="file_8h.html#a80dd03f007cf94c4222a6b6e1f5b4c38">copy_dir</a> (const QString &source, const QString &dest)</td></tr> </table> <hr/><h2>Function Documentation</h2> <a class="anchor" id="a80dd03f007cf94c4222a6b6e1f5b4c38"></a><!-- doxytag: member="file.h::copy_dir" ref="a80dd03f007cf94c4222a6b6e1f5b4c38" args="(const QString &source, const QString &dest)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">bool copy_dir </td> <td>(</td> <td class="paramtype">const QString & </td> <td class="paramname"> <em>source</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">const QString & </td> <td class="paramname"> <em>dest</em></td><td> </td> </tr> <tr> <td></td> <td>)</td> <td></td><td></td><td></td> </tr> </table> </div> <div class="memdoc"> <p>Recursively copy the contents of one directory to another. The destination must already exist. Returns true on success, and false otherwise. </p> <p>Definition at line <a class="el" href="file_8cpp_source.html#l00071">71</a> of file <a class="el" href="file_8cpp_source.html">file.cpp</a>.</p> <p>References <a class="el" href="file_8cpp_source.html#l00071">copy_dir()</a>.</p> <p>Referenced by <a class="el" href="file_8cpp_source.html#l00071">copy_dir()</a>, and <a class="el" href="_main_window_8cpp_source.html#l00591">MainWindow::launchBrowserFromDirectory()</a>.</p> </div> </div> <a class="anchor" id="ae15354f79a89888da691222de003851f"></a><!-- doxytag: member="file.h::create_path" ref="ae15354f79a89888da691222de003851f" args="(const QString &path)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">bool create_path </td> <td>(</td> <td class="paramtype">const QString & </td> <td class="paramname"> <em>path</em></td> <td> ) </td> <td></td> </tr> </table> </div> <div class="memdoc"> <p>Creates all directories in <b>path</b>, if they do not exist. </p> <p>Definition at line <a class="el" href="file_8cpp_source.html#l00056">56</a> of file <a class="el" href="file_8cpp_source.html">file.cpp</a>.</p> <p>Referenced by <a class="el" href="_geo_ip_cache_8cpp_source.html#l00046">GeoIpCache::saveToDisk()</a>, and <a class="el" href="file_8cpp_source.html#l00032">touch_file()</a>.</p> </div> </div> <a class="anchor" id="aaa3960262cc91df6d2400eb7ba888ae5"></a><!-- doxytag: member="file.h::expand_filename" ref="aaa3960262cc91df6d2400eb7ba888ae5" args="(const QString &filename)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">QString expand_filename </td> <td>(</td> <td class="paramtype">const QString & </td> <td class="paramname"> <em>filename</em></td> <td> ) </td> <td></td> </tr> </table> </div> <div class="memdoc"> <p>Expands <b>filename</b> if it starts with "~/". On Windows, this will expand "%APPDATA%" and "%PROGRAMFILES%". If <b>filename</b> does not start with a shortcut, <b>filename</b> will be returned unmodified. </p> <p>Definition at line <a class="el" href="file_8cpp_source.html#l00109">109</a> of file <a class="el" href="file_8cpp_source.html">file.cpp</a>.</p> <p>References <a class="el" href="win32_8cpp_source.html#l00087">win32_app_data_folder()</a>, and <a class="el" href="win32_8cpp_source.html#l00079">win32_program_files_folder()</a>.</p> <p>Referenced by <a class="el" href="_main_window_8cpp_source.html#l01466">MainWindow::loadControlCookie()</a>, <a class="el" href="_tor_control_8cpp_source.html#l00114">TorControl::start()</a>, <a class="el" href="_main_window_8cpp_source.html#l00996">MainWindow::start()</a>, and <a class="el" href="file_8cpp_source.html#l00032">touch_file()</a>.</p> </div> </div> <a class="anchor" id="a61bc27b5a127db67fdccb95e3a659c97"></a><!-- doxytag: member="file.h::touch_file" ref="a61bc27b5a127db67fdccb95e3a659c97" args="(const QString &filename, bool createdir=false, QString *errmsg=0)" --> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">bool touch_file </td> <td>(</td> <td class="paramtype">const QString & </td> <td class="paramname"> <em>filename</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">bool </td> <td class="paramname"> <em>createdir</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">QString * </td> <td class="paramname"> <em>errmsg</em></td><td> </td> </tr> <tr> <td></td> <td>)</td> <td></td><td></td><td></td> </tr> </table> </div> <div class="memdoc"> <p>Create an empty file named <b>filename</b>. if <b>createdir</b> is true, then the full path to <b>filename</b> will be created. Returns true on success, or false on error and <b>errmsg</b> will be set. </p> <p>Definition at line <a class="el" href="file_8cpp_source.html#l00032">32</a> of file <a class="el" href="file_8cpp_source.html">file.cpp</a>.</p> <p>References <a class="el" href="file_8cpp_source.html#l00056">create_path()</a>, <a class="el" href="stringutil_8cpp_source.html#l00038">err()</a>, and <a class="el" href="file_8cpp_source.html#l00109">expand_filename()</a>.</p> <p>Referenced by <a class="el" href="_advanced_page_8cpp_source.html#l00220">AdvancedPage::browseTorConfig()</a>, and <a class="el" href="_main_window_8cpp_source.html#l00996">MainWindow::start()</a>.</p> </div> </div> </div> <hr class="footer"/><address style="text-align: right;"><small>Generated on Mon Aug 30 22:58:55 2010 for Vidalia by <a href="http://www.doxygen.org/index.html"> <img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.3 </small></address> </body> </html>