Main Page   Namespace List   Class Hierarchy   Compound List   File List   Namespace Members   Compound Members   File Members  

UnixSystem Class Reference

#include <unix_system.hxx>

Inheritance diagram for UnixSystem:

Inheritance graph
[legend]
Collaboration diagram for UnixSystem:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 UnixSystem ()
virtual ~UnixSystem ()
unsigned int get_time ()
void sleep (unsigned long)
std::string get_construo_rc_path ()
std::string get_user_realname ()
std::string get_user_email ()
FILE * open_input_file (const std::string &filename)
FILE * open_output_file (const std::string &filename)
unsigned int get_mtime (const std::string &filename)
FileType get_file_type (const std::string &filename)
std::vector< std::string > read_directory (const std::string &pathname)
std::string translate_filename (const std::string &)

Detailed Description

This class wraps a bunch of unix functions to provide file-io and the current time

Definition at line 28 of file unix_system.hxx.


Constructor & Destructor Documentation

UnixSystem::UnixSystem  
 

Definition at line 39 of file unix_system.cxx.

UnixSystem::~UnixSystem   [virtual]
 

Definition at line 81 of file unix_system.cxx.


Member Function Documentation

std::string UnixSystem::get_construo_rc_path   [virtual]
 

Returns:
'$HOME/.construo/'

Implements SystemContext.

Definition at line 103 of file unix_system.cxx.

FileType UnixSystem::get_file_type const std::string &    filename [virtual]
 

Returns:
the type of the given file

Implements SystemContext.

Definition at line 154 of file unix_system.cxx.

References FT_CONSTRUO_FILE, FT_DIRECTORY, FT_UNKNOWN_FILE, StringUtils::has_suffix(), and translate_filename().

unsigned int UnixSystem::get_mtime const std::string &    filename [virtual]
 

Implements SystemContext.

Definition at line 138 of file unix_system.cxx.

References translate_filename().

unsigned int UnixSystem::get_time   [virtual]
 

Implements SystemContext.

Definition at line 86 of file unix_system.cxx.

std::string UnixSystem::get_user_email   [virtual]
 

Returns:
the email of the current user or an empty string if not available

Implements SystemContext.

Definition at line 126 of file unix_system.cxx.

std::string UnixSystem::get_user_realname   [virtual]
 

Returns:
the realname of the current user

Implements SystemContext.

Definition at line 110 of file unix_system.cxx.

FILE * UnixSystem::open_input_file const std::string &    filename [virtual]
 

Implements SystemContext.

Definition at line 211 of file unix_system.cxx.

References translate_filename().

FILE * UnixSystem::open_output_file const std::string &    filename [virtual]
 

Implements SystemContext.

Definition at line 218 of file unix_system.cxx.

References translate_filename().

std::vector< std::string > UnixSystem::read_directory const std::string &    pathname [virtual]
 

Returns:
a list of files available in the given directory

Implements SystemContext.

Definition at line 257 of file unix_system.cxx.

References translate_filename().

void UnixSystem::sleep unsigned    long [virtual]
 

sleep for the given number of milisec

Implements SystemContext.

Definition at line 97 of file unix_system.cxx.

std::string UnixSystem::translate_filename const std::string &    [virtual]
 

Implements SystemContext.

Definition at line 191 of file unix_system.cxx.

References StringUtils::has_prefix().

Referenced by get_file_type(), get_mtime(), open_input_file(), open_output_file(), and read_directory().


The documentation for this class was generated from the following files:
Generated on Thu Jul 24 10:25:26 2003 for Construo by doxygen1.3-rc3

Rabisu Mirror Service We provide mirrors to support Open source communities. Our mirror server is located in Istanbul/Turkey region.

Please do not hesitate to contact mirror@rabisu.com for new open source mirror submissions.