EPICS ARCHIVER V4
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Groups
Static Public Member Functions | List of all members
Filename Class Reference

Basename, dirname and other file name related helpers. More...

#include <Filename.h>

Static Public Member Functions

static bool isValid (const stdString &name)
 Check if non-empty.
 
static bool isValid (const char *name)
 Check if non-empty.
 
static void build (const stdString &dirname, const stdString &basename, stdString &filename)
 Build filename from dir. and basename.
 
static bool containsPath (const stdString &filename)
 Returns true if filename contains a path/directory. More...
 
static bool containsFullPath (const stdString &filename)
 Returns true if filename contains a full path/directory. More...
 
static void getDirname (const stdString &filename, stdString &dirname)
 Get directory (path) from full path/filename.
 
static void getBasename (const stdString &filename, stdString &basename)
 Get basename from full filename.
 
static bool getLinkedFilename (const stdString &filename, stdString &link)
 If filename is a link, get target of link. More...
 

Detailed Description

Basename, dirname and other file name related helpers.

On UNIX systems, the filenames are build using slashes (/), on WIN32 systems both slashes and backslashes () are allowed for input. The generated names are always build using slashes since both the UNIX and WIN32 system routines can handle those.

Member Function Documentation

static bool Filename::containsFullPath ( const stdString &  filename)
static

Returns true if filename contains a full path/directory.

Really only checks if the filename starts with a path separator.

static bool Filename::containsPath ( const stdString &  filename)
static

Returns true if filename contains a path/directory.

Really only checks if the filename contains a path separator.

static bool Filename::getLinkedFilename ( const stdString &  filename,
stdString &  link 
)
static

If filename is a link, get target of link.

Else return false.

Implementation detail: It is OK for filename and link to refer to the same stdString.


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