YARP
Yet Another Robot Platform
 
Loading...
Searching...
No Matches
yarpcontextutils.h File Reference
#include <string>
#include <yarp/os/ResourceFinder.h>
#include <yarp/conf/filesystem.h>
#include <iostream>
#include <vector>
+ Include dependency graph for yarpcontextutils.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Macros

#define PATH_SEPARATOR   std::string{yarp::conf::filesystem::preferred_separator}
 

Enumerations

enum  folderType {
  CONTEXTS =0 ,
  ROBOTS =1
}
 

Functions

bool fileCopy (std::string srcFileName, std::string destFileName, bool force=false, bool verbose=true)
 
bool fileRemove (std::string fileName)
 
int recursiveCopy (std::string srcDirName, std::string destDirName, bool force=false, bool verbose=true)
 
int recursiveRemove (std::string dirName, bool verbose=true)
 
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)
 
int recursiveDiff (std::string srcDirName, std::string destDirName, std::ostream &output=std::cout)
 
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=std::cout)
 
int import (yarp::os::Bottle &importArg, folderType fType, bool verbose=false)
 
int importAll (folderType fType, bool verbose=false)
 
int remove (yarp::os::Bottle &removeArg, folderType fType, bool verbose=false)
 
int diff (std::string contextName, folderType fType, bool verbose=false)
 
int diffList (folderType fType, bool verbose=false)
 
int merge (yarp::os::Bottle &mergeArg, folderType fType, bool verbose=false)
 

Macro Definition Documentation

◆ PATH_SEPARATOR

#define PATH_SEPARATOR   std::string{yarp::conf::filesystem::preferred_separator}

Definition at line 16 of file yarpcontextutils.h.

Enumeration Type Documentation

◆ folderType

enum folderType
Enumerator
CONTEXTS 
ROBOTS 

Definition at line 18 of file yarpcontextutils.h.

Function Documentation

◆ diff()

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

Definition at line 863 of file yarpcontextutils.cpp.

◆ diffList()

int diffList ( folderType  fType,
bool  verbose = false 
)

Definition at line 903 of file yarpcontextutils.cpp.

◆ fileCopy()

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

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.

◆ import()

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

Definition at line 611 of file yarpcontextutils.cpp.

◆ importAll()

int importAll ( folderType  fType,
bool  verbose = false 
)

Definition at line 696 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 = false 
)

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 = false,
bool  verbose = true 
)

Definition at line 146 of file yarpcontextutils.cpp.

◆ recursiveDiff()

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

Definition at line 472 of file yarpcontextutils.cpp.

◆ recursiveMerge()

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

Definition at line 554 of file yarpcontextutils.cpp.

◆ recursiveRemove()

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

Definition at line 217 of file yarpcontextutils.cpp.

◆ remove()

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

Definition at line 752 of file yarpcontextutils.cpp.