Main Page | Namespace List | Class Hierarchy | Class List | Directories | File List | Namespace Members | Class Members | File Members

# Keos::CFile Class Reference

Class facilitating the manipulation of files. More...

`#include <KeosFile.h>`

List of all members.

## Public Member Functions

| CFile (const String &strName="unknown")
| Constructor using a String.
| CFile (const char *strName)
| Constructor using a const char*.
bool | Exists () const
| Indicate if the file exists or not.
const String & | Fullname () const
| Return the name of the file with its path.
String | Filename () const
| Return the name of the file without its path.
String | ShortFilename () const
| Return the name of the file without path nor extension.
String | Extension () const
| Return the file extension.

## Private Attributes

String | m_strName
| Complete path of the file.

## Detailed Description

Class facilitating the manipulation of files.

Definition at line 36 of file KeosFile.h.

## Constructor & Destructor Documentation

Keos::CFile::CFile | ( | const String & | strName = `"unknown"` | ) |

| Constructor using a String.

Parameters:

  | strName | Complete path of th file.

Definition at line 31 of file KeosFile.cpp.

References m_strName.

Keos::CFile::CFile | ( | const char * | strName | ) |

| Constructor using a const char*.

Parameters:

  | strName | Complete path of th file.

Definition at line 38 of file KeosFile.cpp.

References m_strName.

## Member Function Documentation

bool Keos::CFile::Exists | ( |  | ) | const

| Indicate if the file exists or not.

Returns:
  True if the file exists.

Definition at line 45 of file KeosFile.cpp.

References m_strName.

Referenced by Keos::CMediaManager::FindMedia().

String Keos::CFile::Extension | ( |  | ) | const

| Return the file extension.

Returns:
  The tile extension.

Definition at line 75 of file KeosFile.cpp.

References m_strName.

String Keos::CFile::Filename | ( |  | ) | const

| Return the name of the file without its path.

Returns:
  The name of the file without its path.

Definition at line 58 of file KeosFile.cpp.

References m_strName.

Referenced by Keos::CMemoryManager::Allocate(), Keos::CMemoryManager::Free(), and ShortFilename().

const String & Keos::CFile::Fullname | ( |  | ) | const

| Return the name of the file with its path.

Returns:
  The name of the file without its path.

Definition at line 52 of file KeosFile.cpp.

References m_strName.

Referenced by Keos::CFontManager::LoadFont(), and Keos::CMediaManager::LoadMediaFromFile().

String Keos::CFile::ShortFilename | ( |  | ) | const

| Return the name of the file without path nor extension.

Returns:
  The name of the file without path nor extension.

Definition at line 69 of file KeosFile.cpp.

References Filename().

## Member Data Documentation

String Keos::CFile::m_strName`[private]`

| Complete path of the file. Definition at line 78 of file KeosFile.h. Referenced by CFile(), Exists(), Extension(), Filename(), and Fullname().

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

- KeosEngine/KeosFile.h
- KeosEngine/KeosFile.cpp