zorba::file Class Reference

#include <zorba/util/file.h>

Inheritance diagram for zorba::file:

zorba::filesystem_path

List of all members.

Public Types

typedef int64_t file_size_t
enum  filetype {
  type_invalid, type_non_existent, type_directory, type_link,
  type_file, type_volume
}
enum  flags_t { CONVERT_SLASHES = 1 << 0, RESOLVE = 1 << 1 }

Public Member Functions

filesystem_path branch_path () const
const char * c_str ()
void chdir ()
void create ()
void deep_mkdir ()
bool exists () const
 file (const filesystem_path &path, int flags=0)
enum filetype get_filetype ()
const std::string & get_path () const
file_size_t get_size () const
bool is_complete () const
bool is_directory () const
bool is_empty () const
bool is_file () const
bool is_invalid () const
bool is_link () const
bool is_root () const
bool is_volume () const
void mkdir ()
 operator const std::string & () const
void remove (bool ignore=true)
void rename (std::string const &newpath)
void resolve_relative ()
void rmdir (bool ignore)
void set_filetype (enum filetype _type)
void set_path (std::string const &_path)

Static Public Member Functions

static volatile void error (std::string const &location, std::string const &msg)
static const char * get_path_separator ()

Protected Member Functions

void do_stat ()

Protected Attributes

file_size_t size
enum filetype type


Detailed Description

Definition at line 28 of file file.h.


Member Typedef Documentation

typedef int64_t zorba::file::file_size_t

Definition at line 43 of file file.h.


Member Enumeration Documentation

Enumerator:
type_invalid 
type_non_existent 
type_directory 
type_link 
type_file 
type_volume 

Definition at line 31 of file file.h.

Enumerator:
CONVERT_SLASHES 
RESOLVE 

Definition at line 15 of file path.h.


Constructor & Destructor Documentation

zorba::file::file ( const filesystem_path path,
int  flags = 0 
)


Member Function Documentation

filesystem_path zorba::filesystem_path::branch_path (  )  const [inherited]

const char* zorba::filesystem_path::c_str (  )  [inline, inherited]

Definition at line 21 of file path.h.

void zorba::file::chdir (  ) 

void zorba::file::create (  ) 

void zorba::file::deep_mkdir (  ) 

void zorba::file::do_stat (  )  [protected]

static volatile void zorba::file::error ( std::string const &  location,
std::string const &  msg 
) [static]

bool zorba::file::exists (  )  const [inline]

Definition at line 68 of file file.h.

References type, type_invalid, and type_non_existent.

enum filetype zorba::file::get_filetype (  ) 

const std::string& zorba::filesystem_path::get_path (  )  const [inline, inherited]

Definition at line 20 of file path.h.

Referenced by zorba::filesystem_path::filesystem_path(), and zorba::operator<<().

static const char* zorba::filesystem_path::get_path_separator (  )  [static, inherited]

file_size_t zorba::file::get_size (  )  const [inline]

Definition at line 76 of file file.h.

References size.

bool zorba::filesystem_path::is_complete (  )  const [inherited]

bool zorba::file::is_directory (  )  const [inline]

Definition at line 62 of file file.h.

References type, and type_directory.

bool zorba::file::is_empty (  )  const [inline]

Definition at line 86 of file file.h.

References size.

bool zorba::file::is_file (  )  const [inline]

Definition at line 63 of file file.h.

References type, and type_file.

bool zorba::file::is_invalid (  )  const [inline]

Definition at line 67 of file file.h.

References type, and type_invalid.

bool zorba::file::is_link (  )  const [inline]

Definition at line 64 of file file.h.

References type, and type_link.

bool zorba::filesystem_path::is_root (  )  const [inherited]

bool zorba::file::is_volume (  )  const [inline]

Definition at line 65 of file file.h.

References type, and type_volume.

void zorba::file::mkdir (  ) 

zorba::filesystem_path::operator const std::string & (  )  const [inline, inherited]

Definition at line 22 of file path.h.

void zorba::file::remove ( bool  ignore = true  ) 

void zorba::file::rename ( std::string const &  newpath  ) 

void zorba::filesystem_path::resolve_relative (  )  [inherited]

void zorba::file::rmdir ( bool  ignore  ) 

void zorba::file::set_filetype ( enum filetype  _type  )  [inline]

Definition at line 59 of file file.h.

References type.

void zorba::file::set_path ( std::string const &  _path  )  [inline]

Definition at line 58 of file file.h.


Member Data Documentation

Definition at line 50 of file file.h.

Referenced by get_size(), and is_empty().

enum filetype zorba::file::type [protected]

Definition at line 47 of file file.h.

Referenced by exists(), is_directory(), is_file(), is_invalid(), is_link(), is_volume(), and set_filetype().


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