CrystalSpace

Public API Reference

CS::Platform Namespace Reference

Platform specific code and wrappers. More...

Namespaces

namespace  Win32
 

Win32-specific classes and functions.


Classes

struct  File
 Functions to abstract platform-specific file access. More...
class  ProcessorSpecDetection
 Class performing processor specifications and feature detection. More...

Functions

int CreateDirectory (const char *path)
 Create a directory.
size_t GetMaxVirtualSize ()
 Retrieve the maximum number of KiB of virtual address space available to the process.
size_t GetPhysicalMemorySize ()
 Retrieve the number of KiB of physical system memory.
uint GetProcessorCount ()
 Retrieve the number of processors in the system.
csString GetTempDirectory ()
 Get system specific temporary folder.
csString GetTempFilename (const char *path)
 Get file name for temporary file within specified directory.
bool IsDirectory (struct stat *file_stat)
 Checks if the file attributes represent a directory.
bool IsDirectory (const char *path)
 Checks if the path represents a directory.
bool IsRegularFile (struct stat *file_stat)
 Checks if the file attributes represent a regular file.
bool IsRegularFile (const char *path)
 Checks if the path represents a regular file.
int Stat (const char *path, struct stat *buf)
 Check attributes of a path.

Detailed Description

Platform specific code and wrappers.


Function Documentation

int CS::Platform::CreateDirectory ( const char *  path  ) 

Create a directory.

Parameters:
path Name of the directory to create.
Returns:
0 on success, or an error code in case of failure. (This is the error code the standard mkdir function would retutn in errno).
size_t CS::Platform::GetMaxVirtualSize (  ) 

Retrieve the maximum number of KiB of virtual address space available to the process.

Returns:
Virtual address space size (in KiB) on success, or 0 on failure.
size_t CS::Platform::GetPhysicalMemorySize (  ) 

Retrieve the number of KiB of physical system memory.

Returns:
Physical system memory (in KiB) on success, or 0 on failure.
uint CS::Platform::GetProcessorCount (  ) 

Retrieve the number of processors in the system.

Returns:
Number of processors, or 0 on failure.
csString CS::Platform::GetTempDirectory (  ) 

Get system specific temporary folder.

csString CS::Platform::GetTempFilename ( const char *  path  ) 

Get file name for temporary file within specified directory.

bool CS::Platform::IsDirectory ( struct stat *  file_stat  ) 

Checks if the file attributes represent a directory.

Parameters:
file_stat Attributes of file to check.
Returns:
true if the attributes are for a directory, false otherwise.
bool CS::Platform::IsDirectory ( const char *  path  ) 

Checks if the path represents a directory.

Parameters:
path Name of the path to check.
Returns:
true if the path represents a directory, false otherwise (including error).
bool CS::Platform::IsRegularFile ( struct stat *  file_stat  ) 

Checks if the file attributes represent a regular file.

Parameters:
file_stat Attributes of file to check.
Returns:
true if the attributes are for a regular file, false otherwise.
bool CS::Platform::IsRegularFile ( const char *  path  ) 

Checks if the path represents a regular file.

Parameters:
path Name of the path to check.
Returns:
true if the path represents a regular file, false otherwise (including error).
int CS::Platform::Stat ( const char *  path,
struct stat *  buf 
)

Check attributes of a path.

Parameters:
path Name of the path to check.
buf The pointer where the result of the stat call will be stored in case of success.
Returns:
0 on success, or an error code in case of failure. (This is the error code the standard stat function would retutn in errno).

Generated for Crystal Space 2.1 by doxygen 1.6.1