Menge
Modular Pedestrian Simulation Framework for Research and Development
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Namespaces | Typedefs | Functions
os.h File Reference

Various operating-system-dependent file-system operations. More...

#include <string>
#include <vector>
#include <list>
#include "CoreConfig.h"

Go to the source code of this file.

Namespaces

 Menge
 The core namespace. All elements of Menge are contained in this namespace.
 
 os
 A compilation of file system operations.
 
 os::path
 Aggregation of path-oriented, file system operations.
 

Typedefs

typedef unsigned int FILE_SIZE
 The type for reporting file sizes.
 
typedef std::list< std::string > StringList
 A list of strings.
 
typedef StringList::iterator StringListItr
 An interator into a list of strings.
 
typedef StringList::const_iterator StringListCItr
 An const interator into a list of strings.
 

Functions

bool Menge::os::listdir (const std::string &path, StringList &contents, const std::string &wildcard="*")
 Creates a list of all of the files in the given directory. More...
 
FILE_SIZE Menge::os::fileSize (const std::string &path)
 Returns the file size (in bytes) of the file in the given path. More...
 
std::string Menge::os::fileSizeStr (FILE_SIZE size)
 Formats the file size (in bytes) into an easily readable string. More...
 
bool Menge::os::remove (const std::string &path)
 Removes the file located at the given path. More...
 
bool Menge::os::mkdir (const std::string &path)
 Creates the indicated folder. More...
 
bool Menge::os::makedirs (const std::string &path)
 Creates the folder given, and all missing folders in the path to that folder. More...
 
bool Menge::os::path::absPath (const std::string &path, std::string &fullPath)
 Returns the absolute path of the given file resource. More...
 
bool Menge::os::path::isdir (const std::string &path)
 Reports if the path is a directory. More...
 
std::string Menge::os::path::join (unsigned int pathCount,...)
 Joins multiple strings into a single path. More...
 
bool Menge::os::path::exists (const std::string &path)
 Reports if a file object exists. More...
 
void Menge::os::path::split (const std::string &path, std::string &head, std::string &tail)
 Splits the path at the last separator and returns the two parts. More...
 
char Menge::os::path::pathSep ()
 The separator for paths based on OS. More...
 

Detailed Description

Various operating-system-dependent file-system operations.

NOTE: The interface is modeled on python's os module.