Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | File List | Namespace Members | Class Members | File Members | Related Pages

tfindfile Class Reference

Searching for files. More...

#include <basestrm.h>

List of all members.

Public Types

enum  SearchPosition { DefaultDir, CurrentDir, PrimaryDir, AllDirs }
enum  SearchTypes { InsideContainer, OutsideContainer, All }

Public Member Functions

 tfindfile (ASCString name, SearchPosition searchPosition=DefaultDir, SearchTypes searchTypes=All)
 Searches for files matching the wildcard name in all search paths specified for ASC and inside the ASC archive files.
ASCString getnextname (int *loc=NULL, bool *inContainer=NULL, ASCString *location=NULL)
 Returns the next entry of the internal file list.
bool getnextname (FileInfo &fi)
int getFoundFileNum ()

Classes

struct  FileInfo


Detailed Description

Searching for files.

Definition at line 506 of file basestrm.h.


Member Enumeration Documentation

enum tfindfile::SearchPosition
 

Enumeration values:
DefaultDir 
CurrentDir 
PrimaryDir 
AllDirs 

Definition at line 549 of file basestrm.h.

enum tfindfile::SearchTypes
 

Enumeration values:
InsideContainer 
OutsideContainer 
All 

Definition at line 550 of file basestrm.h.


Constructor & Destructor Documentation

tfindfile::tfindfile ASCString  name,
SearchPosition  searchPosition = DefaultDir,
SearchTypes  searchTypes = All
 

Searches for files matching the wildcard name in all search paths specified for ASC and inside the ASC archive files.

If name contains a relative directory entry ( like music / *.mp3 ), searchPosition specifies, which directories will be searched for the file. Note that "Current" may be problemativ in unix environments, because the program may be started from any directory.

Definition at line 1809 of file basestrm.cpp.

References All, AllDirs, ASC_direct, ascDirectory, closedir(), constructFileName(), convertPathDelimitters(), CurrentDir, tfindfile::FileInfo::date, DefaultDir, tfindfile::FileInfo::directoryLevel, ContainerCollector::getfirstname(), ContainerCollector::getnextname(), has_drive_letters, InsideContainer, tfindfile::FileInfo::isInContainer, tfindfile::FileInfo::location, maxSearchDirNum, tfindfile::FileInfo::name, opendir(), OutsideContainer, pathdelimitter, pathdelimitterstring, patimat(), readdir(), searchDirNum, tfindfile::FileInfo::size, strcmpi, and stricmp.


Member Function Documentation

int tfindfile::getFoundFileNum  )  [inline]
 

Definition at line 568 of file basestrm.h.

Referenced by StartMultiplayerGame::Apply().

bool tfindfile::getnextname FileInfo fi  ) 
 

Definition at line 2018 of file basestrm.cpp.

ASCString tfindfile::getnextname int *  loc = NULL,
bool *  inContainer = NULL,
ASCString location = NULL
 

Returns the next entry of the internal file list.

Optionally, some additional information about the file can be returned:

Parameters:
loc contains the number of the directory. ASC can search several directories for files. These directories are specified in the ASC configuration file and CGameOptions
inContainer returns whether the file is inside a ASC archive file ( like main.con )
location contains the directory this file resides in

Definition at line 1990 of file basestrm.cpp.

Referenced by StartMultiplayerGame::Apply(), continuenetworkgame(), exist(), FileCache::FileCache(), FileSelectionItemFactory::FileSelectionItemFactory(), findNextCampaignMap(), getnextfilenumname(), loadalltextfiles(), GraphicSetManager_Base::loadData(), loadGame(), loadmessages(), loadStartupMap(), loadUnitSets(), process_ASC_map(), process_BI_map(), readtextmessage(), MusicPlayList::reset(), SaveGameBaseDialog::SaveGameBaseDialog(), and FileTransfer::send().


The documentation for this class was generated from the following files:
Generated on Tue Jun 24 02:21:31 2008 for Advanced Strategic Command by  doxygen 1.4.2