Cypress  1.0
C++ Spiking Neural Network Simulation Framework
Functions
cypress::filesystem Namespace Reference

Functions

std::string canonicalise (const std::string &file)
 
template<typename T >
void canonicalise_files (T &files)
 
std::unordered_set< std::string > dirs (const std::vector< std::string > &files)
 
template<typename T >
std::string longest_common_path (const T &dirs, char sep= '/')
 
std::string tmpfile (std::string &path)
 

Function Documentation

std::string cypress::filesystem::canonicalise ( const std::string &  file)

Canonicalises the given filename, returns an empty string on error.

template<typename T >
void cypress::filesystem::canonicalise_files ( T &  files)

Canonicalises the given list of filenames.

std::unordered_set<std::string> cypress::filesystem::dirs ( const std::vector< std::string > &  files)

Returns the canonical directories the given files are stored in as unordered set.

template<typename T >
std::string cypress::filesystem::longest_common_path ( const T &  dirs,
char  sep = '/' 
)

Calculates the longest common path from a set of files

std::string cypress::filesystem::tmpfile ( std::string &  path)

Generates a temporary file in the given directory and returns an output stream.

Parameters
pathis the path where the file should be placed, the last charachters of path equaling "X" are replaced with random alphanumeric characters.
Returns
a string pointing at the file that should be created.