- Main Page
- Namespaces
- Classes
- Files
- Directories
- Related Pages

- Alphabetical List
- Class List
- Class Hierarchy
- Class Members

# Exponent::Host::CFileManager Class Reference

List of all members.

## Detailed Description

Manages folders and files.

Date:
  24/08/2004

Author:
  Paul Chana

Version:
  1.0.0 Initial version

  1.0.1 Added in place GetFileInDirectory function

Note:
  All contents of this source code are copyright 2005 Exp Digital Uk.
  This source file is covered by the licence conditions of the Infinity API. You should have recieved a copy
  with the source code. If you didnt, please refer to http://www.expdigital.co.uk All content is the Intellectual property of Exp Digital Uk.
  Certain sections of this code may come from other sources. They are credited where applicable.
  If you have comments, suggestions or bug reports please visit http://support.expdigital.co.uk

Id
  CFileManager.hpp,v 1.7 2007/02/08 21:06:44 paul Exp

Definition at line 39 of file CFileManager.hpp.

## Static Public Member Functions

- static bool createNewFolder (const CSystemString &string)
- static bool doesFileExist (const CSystemString &filename)
- static bool fileExistsInDirectory (const CSystemString &filename, const CSystemString &path)
- static void getApplicationDirectory (CSystemString &string, bool addTrailingSlashes=false)
- static void getFilesInDirectory (TCountedPointerArray< CFileInformation > &array, const CSystemString &path)
- static void getFilesInDirectory (const CSystemString &path, TStringCountedPointerArray *array)
- static long getNumberOfFilesInDirectory (const CSystemString &path)
- static bool isFolderPath (const CSystemString &path)
- static void sortDirectoryContents (TCountedPointerArray< CFileInformation > &array)

## Member Function Documentation

static bool Exponent::Host::CFileManager::createNewFolder | ( | const CSystemString & | string | ) | `[static]`

Create a folder

Parameters:

  | string | Path to create folder at

Return values:

  | bool | True if created properly, false otherwise

static bool Exponent::Host::CFileManager::doesFileExist | ( | const CSystemString & | filename | ) | `[static]`

Does a file exist

Parameters:

  | filename | Name of the fle to look for

Return values:

  | bool | True if file exists in location, false otherwise

static bool Exponent::Host::CFileManager::fileExistsInDirectory | ( | const CSystemString & | filename,
|  | const CSystemString & | path |
| ) |  |  | `[static]`

File is in the directory

Parameters:

  | filename | Name of the file to check for
  | path | The folder you want to look inside

Return values:

  | bool | True if file exists in location, false otherwise

static void Exponent::Host::CFileManager::getApplicationDirectory | ( | CSystemString & | string,
|  | bool | addTrailingSlashes = `false` |
| ) |  |  | `[static]`

Get the current directory (On mac returns the current working directory

Parameters:

  | string | On return is filled with the cwd
  | addTrailingSlashes | If true appends system seperator to end of string

static void Exponent::Host::CFileManager::getFilesInDirectory | ( | TCountedPointerArray< CFileInformation > & | array,
|  | const CSystemString & | path |
| ) |  |  | `[static]`

Get all of the files in a directory (path ends with *.* and returns an array of CFileInformation)

Parameters:

  | array | The array to fill with CFileInformation
  | path | The path to scan

static void Exponent::Host::CFileManager::getFilesInDirectory | ( | const CSystemString & | path,
|  | TStringCountedPointerArray * | array |
| ) |  |  | `[static]`

Get all the files in a directory (path should end with *.*, fills string array with filenames)

Parameters:

  | path | The path to get files for
  | array | On return is filled with strings of the filenames

static long Exponent::Host::CFileManager::getNumberOfFilesInDirectory | ( | const CSystemString & | path | ) | `[static]`

Get the number of files in the directory (path should end with *.*)

Parameters:

  | path | The path to scan

Return values:

  | long | The number of files in the directory

static bool Exponent::Host::CFileManager::isFolderPath | ( | const CSystemString & | path | ) | `[static]`

Is the path to a folder

Parameters:

  | path | The path to check

Return values:

  | bool | True if path is to a folder, false otherwise

static void Exponent::Host::CFileManager::sortDirectoryContents | ( | TCountedPointerArray< CFileInformation > & | array | ) | `[static]`

Sort a contents list in to alphabetical order (with folder first)

Parameters:

  | array | The array of CFileInformation to sort