file.h File Reference

#include <QString>

Go to the source code of this file.

Functions

bool touch_file (QString filename, bool createdir=false, QString *errmsg=0)
bool create_path (QString path)
QString expand_filename (QString filename)


Function Documentation

bool create_path ( QString  path  ) 

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

Definition at line 55 of file file.cpp.

Referenced by GeoIpCache::saveToDisk(), and touch_file().

QString expand_filename ( 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 71 of file file.cpp.

References win32_app_data_folder(), and win32_program_files_folder().

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

bool touch_file ( 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.

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().


Generated on Wed Nov 26 21:03:58 2008 for Vidalia by  doxygen 1.5.6