Vidalia  0.2.17
Functions
file.h File Reference
#include <QString>

Go to the source code of this file.

Functions

bool touch_file (const QString &filename, bool createdir=false, QString *errmsg=0)
bool create_path (const QString &path)
QString expand_filename (const QString &filename)
bool copy_dir (const QString &source, const QString &dest)

Function Documentation

bool copy_dir ( const QString &  source,
const QString &  dest 
)

Recursively copy the contents of one directory to another. The destination must already exist. Returns true on success, and false otherwise.

Definition at line 70 of file file.cpp.

References copy_dir().

Referenced by copy_dir(), and MainWindow::launchBrowserFromDirectory().

bool create_path ( const QString &  path)

Creates all directories in path, if they do not exist.

Definition at line 55 of file file.cpp.

Referenced by touch_file().

QString expand_filename ( const QString &  filename)

Expands filename if it starts with "~/". On Windows, this will expand "%APPDATA%" and "%PROGRAMFILES%". If filename does not start with a shortcut, filename will be returned unmodified.

Definition at line 108 of file file.cpp.

References win32_app_data_folder(), and win32_program_files_folder().

Referenced by MainWindow::loadControlCookie(), TorControl::start(), MainWindow::start(), MainWindow::started(), touch_file(), and MainWindow::updateBrowserEnv().

bool touch_file ( const QString &  filename,
bool  createdir,
QString *  errmsg 
)

Create an empty file named filename. if createdir is true, then the full path to filename will be created. Returns true on success, or false on error and errmsg will be set.

Definition at line 31 of file file.cpp.

References create_path(), err(), and expand_filename().

Referenced by AdvancedPage::browseTorConfig(), and MainWindow::start().