YARP
Yet Another Robot Platform
 
Loading...
Searching...
No Matches
yarpcontextutils.cpp File Reference
#include "yarpcontextutils.h"
#include <yarp/conf/dirs.h>
#include <yarp/os/Os.h>
#include <yarp/os/Log.h>
#include <yarp/os/impl/PlatformDirent.h>
#include <yarp/os/impl/PlatformSysStat.h>
#include <yarp/os/impl/PlatformUnistd.h>
#include <set>
#include <string>
#include <fstream>
#include <iostream>
#include <cstdlib>
#include <cstring>
#include <cerrno>
#include <diff_match_patch.h>
+ Include dependency graph for yarpcontextutils.cpp:

Go to the source code of this file.

Functions

std::string getFolderStringName (folderType ftype)
 
std::string getFolderStringNameHidden (folderType ftype)
 
bool isHidden (std::string fileName)
 
bool fileCopy (std::string srcFileName, std::string destFileName, bool force, bool verbose)
 
bool fileRemove (std::string fileName)
 
int recursiveCopy (std::string srcDirName, std::string destDirName, bool force, bool verbose)
 
int recursiveRemove (std::string dirName, bool verbose)
 
std::vector< std::string > listContentDirs (const std::string &curPath)
 
std::vector< std::string > listContentFiles (const std::string &curPath)
 
void printContentDirs (const std::string &curPath)
 
void printUserFolders (yarp::os::ResourceFinder &rf, folderType ftype)
 
void printSysadmFolders (yarp::os::ResourceFinder &rf, folderType ftype)
 
void printInstalledFolders (yarp::os::ResourceFinder &rf, folderType ftype)
 
void prepareHomeFolder (yarp::os::ResourceFinder &rf, folderType ftype)
 
bool prepareSubFolders (const std::string &startDir, const std::string &fileName)
 
bool recursiveFileList (const char *basePath, const char *suffix, std::set< std::string > &filenames)
 
int recursiveDiff (std::string srcDirName, std::string destDirName, std::ostream &output)
 
int fileMerge (std::string srcFileName, std::string destFileName, std::string commonParentName)
 
int recursiveMerge (std::string srcDirName, std::string destDirName, std::string commonParentName, std::ostream &output)
 
int import (yarp::os::Bottle &importArg, folderType fType, bool verbose)
 
int importAll (folderType fType, bool verbose)
 
int remove (yarp::os::Bottle &removeArg, folderType fType, bool verbose)
 
int diff (std::string contextName, folderType fType, bool verbose)
 
int diffList (folderType fType, bool verbose)
 
int merge (yarp::os::Bottle &mergeArg, folderType fType, bool verbose)
 

Function Documentation

◆ diff()

int diff ( std::string  contextName,
folderType  fType,
bool  verbose 
)

Definition at line 863 of file yarpcontextutils.cpp.

◆ diffList()

int diffList ( folderType  fType,
bool  verbose 
)

Definition at line 903 of file yarpcontextutils.cpp.

◆ fileCopy()

bool fileCopy ( std::string  srcFileName,
std::string  destFileName,
bool  force,
bool  verbose 
)

Definition at line 92 of file yarpcontextutils.cpp.

◆ fileMerge()

int fileMerge ( std::string  srcFileName,
std::string  destFileName,
std::string  commonParentName 
)

Definition at line 530 of file yarpcontextutils.cpp.

◆ fileRemove()

bool fileRemove ( std::string  fileName)

Definition at line 141 of file yarpcontextutils.cpp.

◆ getFolderStringName()

std::string getFolderStringName ( folderType  ftype)

Definition at line 52 of file yarpcontextutils.cpp.

◆ getFolderStringNameHidden()

std::string getFolderStringNameHidden ( folderType  ftype)

Definition at line 65 of file yarpcontextutils.cpp.

◆ import()

int import ( yarp::os::Bottle importArg,
folderType  fType,
bool  verbose 
)

Definition at line 611 of file yarpcontextutils.cpp.

◆ importAll()

int importAll ( folderType  fType,
bool  verbose 
)

Definition at line 696 of file yarpcontextutils.cpp.

◆ isHidden()

bool isHidden ( std::string  fileName)

Definition at line 78 of file yarpcontextutils.cpp.

◆ listContentDirs()

std::vector< std::string > listContentDirs ( const std::string &  curPath)

Definition at line 258 of file yarpcontextutils.cpp.

◆ listContentFiles()

std::vector< std::string > listContentFiles ( const std::string &  curPath)

Definition at line 287 of file yarpcontextutils.cpp.

◆ merge()

int merge ( yarp::os::Bottle mergeArg,
folderType  fType,
bool  verbose 
)

Definition at line 947 of file yarpcontextutils.cpp.

◆ prepareHomeFolder()

void prepareHomeFolder ( yarp::os::ResourceFinder rf,
folderType  ftype 
)

Definition at line 380 of file yarpcontextutils.cpp.

◆ prepareSubFolders()

bool prepareSubFolders ( const std::string &  startDir,
const std::string &  fileName 
)

Definition at line 408 of file yarpcontextutils.cpp.

◆ printContentDirs()

void printContentDirs ( const std::string &  curPath)

Definition at line 332 of file yarpcontextutils.cpp.

◆ printInstalledFolders()

void printInstalledFolders ( yarp::os::ResourceFinder rf,
folderType  ftype 
)

Definition at line 367 of file yarpcontextutils.cpp.

◆ printSysadmFolders()

void printSysadmFolders ( yarp::os::ResourceFinder rf,
folderType  ftype 
)

Definition at line 354 of file yarpcontextutils.cpp.

◆ printUserFolders()

void printUserFolders ( yarp::os::ResourceFinder rf,
folderType  ftype 
)

Definition at line 341 of file yarpcontextutils.cpp.

◆ recursiveCopy()

int recursiveCopy ( std::string  srcDirName,
std::string  destDirName,
bool  force,
bool  verbose 
)

Definition at line 146 of file yarpcontextutils.cpp.

◆ recursiveDiff()

int recursiveDiff ( std::string  srcDirName,
std::string  destDirName,
std::ostream &  output 
)

Definition at line 472 of file yarpcontextutils.cpp.

◆ recursiveFileList()

bool recursiveFileList ( const char basePath,
const char suffix,
std::set< std::string > &  filenames 
)

Definition at line 424 of file yarpcontextutils.cpp.

◆ recursiveMerge()

int recursiveMerge ( std::string  srcDirName,
std::string  destDirName,
std::string  commonParentName,
std::ostream &  output 
)

Definition at line 554 of file yarpcontextutils.cpp.

◆ recursiveRemove()

int recursiveRemove ( std::string  dirName,
bool  verbose 
)

Definition at line 217 of file yarpcontextutils.cpp.

◆ remove()

int remove ( yarp::os::Bottle removeArg,
folderType  fType,
bool  verbose 
)

Definition at line 752 of file yarpcontextutils.cpp.