CFileManager Class Reference

Handle loading and saving to files. More...

#include <fileManager.h>

List of all members.

Public Types

enum  eType {
  kNoFile = -3, kUnknown = -2, kEmpty = -1, kXml = 1,
  kModel, kMapEnt, kImage, kSound
}
 File type. More...

Static Public Member Functions

static eType get_type (const char *filename, bool check=false)
static void clear_paths ()
 Reset paths.
static void t7_path (const std::string &str)
 
Parameters:
str Set t7 path to string.

static void proj_path (const std::string &str)
 
Parameters:
str Set project path to string.

static const std::string & t7_path ()
 
Returns:
t7 path

static const std::string & proj_path ()
 
Returns:
project path

static bool locate (std::string &filepath, const std::string &filename)
static bool exists (const char *filepath)


Detailed Description

Handle loading and saving to files.

(c) 2007-2008 oP group Germany GbR. All rights reserved.
This source code is provided "as is" with no warranty and must not be distributed without written permission.

Author:
Doug Poston
Version:
1.3
Date:
12/28/2007

Member Enumeration Documentation

enum CFileManager::eType

File type.

Enumerator:
kNoFile  No file found.
kUnknown  Unknown file type.
kEmpty  No extention.
kXml  XML data.
kModel  A7 model.
kMapEnt  Map Entity.
kImage  Image.
kSound  Sound.


Member Function Documentation

CFileManager::eType CFileManager::get_type ( const char *  filename,
bool  check = false 
) [static]

Return the type of file filename is using its extension

Parameters:
filename Name of the file
check If true, check to see if the file exists first
Returns:
An enum with the filetype

bool CFileManager::locate ( std::string &  filepath,
const std::string &  filename 
) [static]

Parameters:
filepath Full path to filename given (if there is one).
filename Filename we are looking for.
Returns:
true if a valid path is found (otherwise false).

bool CFileManager::exists ( const char *  filepath  )  [static]

Parameters:
filepath Full path to file we want to check.
Returns:
true if file existis, otherwise false.

Todo:
Replace this with a quicker way to check all valid paths and filetypes


The documentation for this class was generated from the following files:
Generated on Fri Dec 28 12:55:07 2007 for template7 by  doxygen 1.5.4