GNU CommonC++
ost::Dir Class Reference

A low level portable directory class. More...

#include <file.h>

Inheritance diagram for ost::Dir:
ost::File

Public Member Functions

 Dir (const char *name=NULL)
void open (const char *name)
void close (void)
virtual ~Dir ()
const char * getName (void)
const char * operator++ ()
const char * operator++ (int)
const char * operator* ()
bool rewind (void)
bool operator! ()
bool isValid (void)

Static Public Member Functions

static bool create (const char *path, Attr attr=attrGroup)
static bool remove (const char *path)
static bool setPrefix (const char *path)
static bool getPrefix (char *path, size_t size=256)
Static Public Member Functions inherited from ost::File
static const char * getExtension (const char *path)
static const char * getFilename (const char *path)
static char * getFilename (const char *path, char *buffer, size_t size=64)
static char * getDirname (const char *path, char *buffer, size_t size=256)
static char * getRealpath (const char *path, char *buffer, size_t size=256)

Additional Inherited Members

Public Types inherited from ost::File
enum  Error {
  errSuccess = 0 , errNotOpened , errMapFailed , errInitFailed ,
  errOpenDenied , errOpenFailed , errOpenInUse , errReadInterrupted ,
  errReadIncomplete , errReadFailure , errWriteInterrupted , errWriteIncomplete ,
  errWriteFailure , errLockFailure , errExtended
}
enum  Access { accessReadOnly = O_RDONLY , accessWriteOnly = O_WRONLY , accessReadWrite = O_RDWR }
enum  Open {
  openReadOnly = O_RDONLY , openWriteOnly = O_WRONLY , openReadWrite = O_RDWR , openAppend = O_WRONLY | O_APPEND ,
  openSync = O_RDWR , openTruncate = O_RDWR | O_TRUNC
}
enum  Attr { attrInvalid = 0 , attrPrivate = 0400 | 0200 , attrGroup = attrPrivate | 0040 | 0020 , attrPublic = attrGroup | 0004 | 0002 }
enum  Mapping { mappedRead = accessReadOnly , mappedWrite = accessWriteOnly , mappedReadWrite = accessReadWrite }
enum  Complete { completionImmediate , completionDelayed , completionDeferred }
typedef enum Error Error
typedef enum Access Access
typedef enum Open Open
typedef enum Attr Attr
typedef enum Complete Complete
typedef enum Mapping Mapping
Protected Types inherited from ost::File
typedef struct ost::File::_fcb fcb_t

Detailed Description

A low level portable directory class.

Used to support ccstd Directory container. This provides a basic mechanism for allocating and accessing file entries.

Author
David Sugar dyfet.nosp@m.@ost.nosp@m.el.co.nosp@m.m

low level directory access class.

Constructor & Destructor Documentation

◆ Dir()

ost::Dir::Dir ( const char * name = NULL)

◆ ~Dir()

virtual ost::Dir::~Dir ( )
virtual

Member Function Documentation

◆ close()

void ost::Dir::close ( void )

◆ create()

bool ost::Dir::create ( const char * path,
Attr attr = attrGroup )
static

References ost::File::attrGroup.

◆ getName()

const char * ost::Dir::getName ( void )

Referenced by operator++(), and operator++().

◆ getPrefix()

bool ost::Dir::getPrefix ( char * path,
size_t size = 256 )
static

References PATH_MAX.

◆ isValid()

bool ost::Dir::isValid ( void )

◆ open()

void ost::Dir::open ( const char * name)

◆ operator!()

bool ost::Dir::operator! ( )
inline

◆ operator*()

const char * ost::Dir::operator* ( )

◆ operator++() [1/2]

const char * ost::Dir::operator++ ( )
inline

References getName().

◆ operator++() [2/2]

const char * ost::Dir::operator++ ( int )
inline

References getName().

◆ remove()

bool ost::Dir::remove ( const char * path)
static

◆ rewind()

bool ost::Dir::rewind ( void )

◆ setPrefix()

bool ost::Dir::setPrefix ( const char * path)
static

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