OpenRaider  0.1.4-dev
Open Source Tomb Raider Game Engine implementation
Public Member Functions | Private Member Functions | Private Attributes | List of all members
Folder Class Reference

#include <Folder.h>

Collaboration diagram for Folder:
[legend]

Public Member Functions

 Folder (std::string folder, bool listDotFiles=false)
 
std::string & getName ()
 
std::string & getPath ()
 
unsigned long fileCount ()
 
FilegetFile (unsigned long i)
 
unsigned long folderCount ()
 
FoldergetFolder (unsigned long i)
 
Folder getParent ()
 
void executeRemoveFiles (std::function< bool(File &f)> func)
 
void findFilesEndingWith (std::vector< File > &found, std::string end, bool casesensitive=false)
 
unsigned long countRecursiveFiles ()
 
void executeRemoveRecursiveFiles (std::function< bool(File &f)> func)
 
std::string getRecursiveFileName (unsigned long i)
 
FilegetRecursiveFile (unsigned long i)
 
void findRecursiveFilesEndingWith (std::vector< File > &found, std::string end, bool casesensitive=false)
 

Private Member Functions

void createFolderItems ()
 
int readFolderItems (std::vector< std::string > &foundFiles, std::vector< std::string > &foundFolders)
 

Private Attributes

std::string name
 Only last part of path. More...
 
std::string path
 Full path, with name and '/' at end. More...
 
bool hasListed
 
bool listDot
 
std::vector< Filefiles
 
std::vector< Folderfolders
 

Detailed Description

Definition at line 28 of file Folder.h.

Constructor & Destructor Documentation

Folder::Folder ( std::string  folder,
bool  listDotFiles = false 
)

Definition at line 35 of file Folder.cpp.

Member Function Documentation

std::string& Folder::getName ( )
inline

Definition at line 32 of file Folder.h.

std::string& Folder::getPath ( )
inline

Definition at line 33 of file Folder.h.

unsigned long Folder::fileCount ( )

Definition at line 80 of file Folder.cpp.

File & Folder::getFile ( unsigned long  i)

Definition at line 85 of file Folder.cpp.

unsigned long Folder::folderCount ( )

Definition at line 91 of file Folder.cpp.

Folder & Folder::getFolder ( unsigned long  i)

Definition at line 96 of file Folder.cpp.

Folder Folder::getParent ( )

Definition at line 102 of file Folder.cpp.

void Folder::executeRemoveFiles ( std::function< bool(File &f)>  func)

Definition at line 110 of file Folder.cpp.

void Folder::findFilesEndingWith ( std::vector< File > &  found,
std::string  end,
bool  casesensitive = false 
)

Definition at line 223 of file Folder.cpp.

unsigned long Folder::countRecursiveFiles ( )

Definition at line 12 of file FolderRecursive.cpp.

void Folder::executeRemoveRecursiveFiles ( std::function< bool(File &f)>  func)

Definition at line 20 of file FolderRecursive.cpp.

std::string Folder::getRecursiveFileName ( unsigned long  i)

Definition at line 27 of file FolderRecursive.cpp.

File & Folder::getRecursiveFile ( unsigned long  i)

Definition at line 47 of file FolderRecursive.cpp.

void Folder::findRecursiveFilesEndingWith ( std::vector< File > &  found,
std::string  end,
bool  casesensitive = false 
)

Definition at line 66 of file FolderRecursive.cpp.

void Folder::createFolderItems ( )
private

Definition at line 119 of file Folder.cpp.

int Folder::readFolderItems ( std::vector< std::string > &  foundFiles,
std::vector< std::string > &  foundFolders 
)
private

Member Data Documentation

std::string Folder::name
private

Only last part of path.

Definition at line 59 of file Folder.h.

std::string Folder::path
private

Full path, with name and '/' at end.

Definition at line 60 of file Folder.h.

bool Folder::hasListed
private

Definition at line 62 of file Folder.h.

bool Folder::listDot
private

Definition at line 63 of file Folder.h.

std::vector<File> Folder::files
private

Definition at line 65 of file Folder.h.

std::vector<Folder> Folder::folders
private

Definition at line 66 of file Folder.h.


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