vivalib library
Concurrent C++11 OpenCV library for Computer Vision applications
Static Public Member Functions | Static Public Attributes | List of all members
viva::Files Class Reference

#include <utils.h>

Static Public Member Functions

static string tmpFilenameInFolder (const string &folder="", const string &ext=".jpg")
 
static Rect bestSquareFrom (Rect &rectangle)
 
static void saveSquaredIn (const Mat &image, string folder, int side=200)
 
static void listdir (const string &dirname, vector< string > &files, bool returnPaths=true)
 
static void listImages (const string &dirname, vector< string > &files, bool returnPaths=true)
 
static bool isDir (const string &fullpath)
 
static bool isFile (const string &fullpath)
 
static void makeDir (const string &fullpath)
 
static bool exists (const string &fullpath)
 
static void getExtension (const string &filename, string &extension)
 
static void getFilename (const string &path, string &filename)
 
static void getBasename (const string &path, string &base)
 

Static Public Attributes

static const string PATH_SEPARATOR
 

Detailed Description

Set of static functions related to file I/0 operations

Member Function Documentation

bool Files::exists ( const string &  fullpath)
static

Checks if the fullpath exits

void Files::getBasename ( const string &  path,
string &  base 
)
static

Returns the basename of file in the path

void Files::getExtension ( const string &  filename,
string &  extension 
)
static

Returns the extension of the filename

void Files::getFilename ( const string &  path,
string &  filename 
)
static

Returns the filename of file in the path

bool Files::isDir ( const string &  fullpath)
static

Check if path is a directory

bool Files::isFile ( const string &  fullpath)
static

Check if path is a regular file

void Files::listdir ( const string &  dirname,
vector< string > &  files,
bool  returnPaths = true 
)
static

List directory content and returns it in a vector

void Files::listImages ( const string &  dirname,
vector< string > &  files,
bool  returnPaths = true 
)
static

List a directory content and returns a vector of the images contined in it.

void Files::makeDir ( const string &  fullpath)
static

Creates a directory in the specified path

string Files::tmpFilenameInFolder ( const string &  folder = "",
const string &  ext = ".jpg" 
)
static

Returns a temporary filename inside folder

Member Data Documentation

const string Files::PATH_SEPARATOR
static
Initial value:
=
"/"

The documentation for this class was generated from the following files: