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

FS.C File Reference

#include <errno.h>
#include <fcntl.h>
#include <string.h>
#include <sys/stat.h>
#include <unistd.h>
#include <limits.h>
#include <Basics.H>
#include "FS.H"

Go to the source code of this file.

Functions

std::ostream & operator<< (std::ostream &os, const FS::Failure &f) throw ()
void FS::OpenReadOnly (const Text &fname, std::ifstream &ifs) throw (FS::DoesNotExist, FS::Failure)
void FS::OpenForWriting (const Text &fname, std::ofstream &ofs) throw (FS::Failure)
void FS::Seek (std::istream &ifs, std::streamoff offset, ios::seekdir orig) throw (FS::Failure)
void FS::Seek (std::ostream &ofs, std::streamoff offset, ios::seekdir orig) throw (FS::Failure)
std::streampos FS::Posn (std::istream &ifs) throw (FS::Failure)
std::streampos FS::Posn (std::ostream &ofs) throw (FS::Failure)
void FS::Read (std::istream &ifs, char *buff, int n) throw (FS::EndOfFile, FS::Failure)
void FS::Write (std::ostream &ofs, char *buff, int n) throw (FS::Failure)
void FS::Copy (std::istream &ifs, std::ostream &ofs, int len) throw (FS::EndOfFile, FS::Failure)
bool FS::AtEOF (std::istream &is) throw ()
void FS::Flush (std::ostream &ofs) throw (FS::Failure)
void FS::Close (std::ifstream &ifs) throw (FS::Failure)
void FS::Close (std::ofstream &ofs) throw (FS::Failure)
void FS::Close (std::fstream &fs) throw (FS::Failure)
void FS::Delete (const Text &fname) throw (FS::Failure)
bool FS::DeleteDir (const Text &dirname) throw (FS::Failure)
bool FS::Exists (const Text &fname) throw ()
bool FS::IsFile (const Text &fname) throw ()
bool FS::IsDirectory (const Text &fname) throw ()
void FS::Touch (const Text &fname, mode_t mode, bool allowOverwrite) throw (FS::AlreadyExists, FS::Failure)
Text FS::ParentDir (const Text &fname) throw (FS::Failure)
Text FS::GetAbsolutePath (const Text &name) throw (FS::Failure)
Text FS::RemoveSpecialArcs (const Text &name) throw ()
void FS::SplitPath (const Text &fname, Text &name, Text &parent) throw (FS::Failure)
Text FS::TempFname (Text prefix, Text(*suffix_func)(), mode_t mode) throw (FS::Failure)


Function Documentation

bool FS::AtEOF std::istream &  is  )  throw ()
 

Definition at line 202 of file FS.C.

void FS::Close std::fstream &  fs  )  throw (FS::Failure)
 

Definition at line 255 of file FS.C.

void FS::Close std::ofstream &  ofs  )  throw (FS::Failure)
 

Definition at line 236 of file FS.C.

void FS::Close std::ifstream &  ifs  )  throw (FS::Failure)
 

Definition at line 222 of file FS.C.

void FS::Copy std::istream &  ifs,
std::ostream &  ofs,
int  len
throw (FS::EndOfFile, FS::Failure)
 

Definition at line 189 of file FS.C.

References min(), FS::Read(), and FS::Write().

void FS::Delete const Text fname  )  throw (FS::Failure)
 

Definition at line 281 of file FS.C.

bool FS::DeleteDir const Text dirname  )  throw (FS::Failure)
 

Definition at line 296 of file FS.C.

bool FS::Exists const Text fname  )  throw ()
 

Definition at line 318 of file FS.C.

void FS::Flush std::ostream &  ofs  )  throw (FS::Failure)
 

Definition at line 209 of file FS.C.

Text FS::GetAbsolutePath const Text name  )  throw (FS::Failure)
 

Definition at line 382 of file FS.C.

bool FS::IsDirectory const Text fname  )  throw ()
 

Definition at line 334 of file FS.C.

bool FS::IsFile const Text fname  )  throw ()
 

Definition at line 326 of file FS.C.

void FS::OpenForWriting const Text fname,
std::ofstream &  ofs
throw (FS::Failure)
 

Definition at line 83 of file FS.C.

void FS::OpenReadOnly const Text fname,
std::ifstream &  ifs
throw (FS::DoesNotExist, FS::Failure)
 

Definition at line 51 of file FS.C.

Text FS::ParentDir const Text fname  )  throw (FS::Failure)
 

Definition at line 374 of file FS.C.

References FS::SplitPath().

std::streampos FS::Posn std::ostream &  ofs  )  throw (FS::Failure)
 

Definition at line 156 of file FS.C.

std::streampos FS::Posn std::istream &  ifs  )  throw (FS::Failure)
 

Definition at line 149 of file FS.C.

void FS::Read std::istream &  ifs,
char *  buff,
int  n
throw (FS::EndOfFile, FS::Failure)
 

Definition at line 163 of file FS.C.

Text FS::RemoveSpecialArcs const Text name  )  throw ()
 

Definition at line 401 of file FS.C.

References Text::FindCharR(), and Text::Sub().

void FS::Seek std::ostream &  ofs,
std::streamoff  offset,
ios::seekdir  orig
throw (FS::Failure)
 

Definition at line 137 of file FS.C.

void FS::Seek std::istream &  ifs,
std::streamoff  offset,
ios::seekdir  orig
throw (FS::Failure)
 

Definition at line 111 of file FS.C.

void FS::SplitPath const Text fname,
Text name,
Text parent
throw (FS::Failure)
 

Definition at line 433 of file FS.C.

References FS::GetAbsolutePath(), PathnameSep, and FS::RemoveSpecialArcs().

Text FS::TempFname Text  prefix,
Text(*)()  suffix_func,
mode_t  mode
throw (FS::Failure)
 

Definition at line 468 of file FS.C.

References Text::cchars(), FdCache::close(), and FdCache::open().

void FS::Touch const Text fname,
mode_t  mode,
bool  allowOverwrite
throw (FS::AlreadyExists, FS::Failure)
 

Definition at line 342 of file FS.C.

References FdCache::close(), and FdCache::open().

void FS::Write std::ostream &  ofs,
char *  buff,
int  n
throw (FS::Failure)
 

Definition at line 178 of file FS.C.

std::ostream& operator<< std::ostream &  os,
const FS::Failure f
throw ()
 

Definition at line 37 of file FS.C.


Generated on Mon May 8 00:49:00 2006 for Vesta by  doxygen 1.4.2