libDwm-0.9.45
Dwm::PathUtils Class Reference

This class just encapsulates miscellaneous utility functions for working with UNIX paths (files and directories). More...

#include <DwmPathUtils.hh>

Static Public Member Functions

static bool IsDirectory (const std::string &path)
 Returns true if path is a directory.
 
static bool HasSuffix (const std::string &path, const std::string &suffix)
 Returns true if path is suffixed with suffix.
 
static std::string Basename (const std::string &path)
 

Detailed Description

This class just encapsulates miscellaneous utility functions for working with UNIX paths (files and directories).

Member Function Documentation

◆ HasSuffix()

static bool Dwm::PathUtils::HasSuffix ( const std::string & path,
const std::string & suffix )
static

Returns true if path is suffixed with suffix.

For example, HasSuffix("foo.cc",".cc") would return true.

◆ IsDirectory()

static bool Dwm::PathUtils::IsDirectory ( const std::string & path)
static

Returns true if path is a directory.

Note that this will also return true if path is a symbolic link pointing to a directory.


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