InspIRCd  3.0
Static Public Member Functions | List of all members
FileSystem Class Reference

#include <fileutils.h>

Static Public Member Functions

static std::string ExpandPath (const std::string &base, const std::string &fragment)
 
static bool FileExists (const std::string &path)
 
static std::string GetFileName (const std::string &path)
 
static bool StartsWithWindowsDriveLetter (const std::string &path)
 

Detailed Description

Implements methods for file system access

Member Function Documentation

◆ ExpandPath()

std::string FileSystem::ExpandPath ( const std::string &  base,
const std::string &  fragment 
)
static

Expands a path fragment to a full path.

Parameters
baseThe base path to expand from
fragmentThe path fragment to expand on top of base.

◆ FileExists()

bool FileSystem::FileExists ( const std::string &  path)
static

Checks whether a file with the specified name exists on the filesystem.

Parameters
pathThe path to a file.
Returns
True if the file exists; otherwise, false.

◆ GetFileName()

std::string FileSystem::GetFileName ( const std::string &  path)
static

Gets the file name segment of a path.

Parameters
pathThe path to extract the file name from.
Returns
The file name segment of a path.

◆ StartsWithWindowsDriveLetter()

bool FileSystem::StartsWithWindowsDriveLetter ( const std::string &  path)
static

Determines whether the given path starts with a Windows drive letter.

Parameters
pathThe path to validate.
Returns
True if the path begins with a Windows drive letter; otherwise, false.

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