#include <config.h>
#include "SyncEvolutionUtil.h"
#include "EvolutionSyncClient.h"
#include <base/test.h>
#include <boost/scoped_array.hpp>
#include <boost/foreach.hpp>
#include <fstream>
#include <errno.h>
#include <unistd.h>
#include <sys/stat.h>
#include <sys/types.h>
#include <dirent.h>
Go to the source code of this file.
Functions | |
CPPUNIT_REGISTRY_ADD_TO_DEFAULT ("SyncEvolution") | |
string | normalizePath (const string &path) |
void | mkdir_p (const string &path) |
void | rm_r (const string &path) |
bool | isDir (const string &path) |
CPPUNIT_REGISTRY_ADD_TO_DEFAULT | ( | "SyncEvolution" | ) |
bool isDir | ( | const string & | path | ) |
true if the path refers to a directory
Definition at line 120 of file SyncEvolutionUtil.cpp.
References EvolutionSyncClient::throwError().
Referenced by FileSyncSource::open().
void mkdir_p | ( | const string & | path | ) |
ensure that m_path is writable, otherwise throw error
Definition at line 66 of file SyncEvolutionUtil.cpp.
References EvolutionSyncClient::throwError().
Referenced by FileConfigNode::flush(), and FileSyncSource::open().
string normalizePath | ( | const string & | path | ) |
remove multiple slashes in a row and dots directly after a slash if not followed by filename, remove trailing /
Definition at line 39 of file SyncEvolutionUtil.cpp.
Referenced by FileConfigTree::getChildren(), FileConfigTree::getRootPath(), and FileConfigTree::open().
void rm_r | ( | const string & | path | ) |
remove a complete directory hierarchy; invoking on non-existant directory is okay
Definition at line 92 of file SyncEvolutionUtil.cpp.
References rm_r(), and EvolutionSyncClient::throwError().
Referenced by LogDir::expire(), rm_r(), SyncEvolutionCmdlineTest::testConfigure(), SyncEvolutionCmdlineTest::testMigrate(), SyncEvolutionCmdlineTest::testOldConfigure(), SyncEvolutionCmdlineTest::testPrintConfig(), SyncEvolutionCmdlineTest::testPrintServers(), SyncEvolutionCmdlineTest::testSetupDefault(), SyncEvolutionCmdlineTest::testSetupFunambol(), SyncEvolutionCmdlineTest::testSetupRenamed(), SyncEvolutionCmdlineTest::testSetupScheduleWorld(), and SyncEvolutionCmdlineTest::testSetupSynthesis().