#include <QDir>
#include <QFile>
#include "file.h"
Go to the source code of this file.
Functions | |
bool | touch_file (QString filename, bool createdir, QString *errmsg) |
bool | create_path (QString path) |
QString | expand_filename (QString filename) |
Definition in file file.cpp.
bool create_path | ( | QString | path | ) |
Creates all directories in path, if they do not exist.
Definition at line 65 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 81 of file file.cpp.
Referenced by TorSettings::getArguments(), MainWindow::loadControlCookie(), TorControl::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.
Definition at line 41 of file file.cpp.
Referenced by AdvancedPage::browseTorConfig(), and TorControl::start().