plptools
Loading...
Searching...
No Matches
PlpDirent Class Reference

A class, representing a directory entry of the Psion. More...

#include <plpdirent.h>

Collaboration diagram for PlpDirent:

Public Member Functions

 PlpDirent ()
 Default constructor. More...
 
 PlpDirent (const PlpDirent &d)
 A copy constructor. More...
 
 PlpDirent (const uint32_t size, const uint32_t attr, const uint32_t tHi, const uint32_t tLo, const char *const name)
 Initializing Constructor. More...
 
 ~PlpDirent ()
 Default destructor. More...
 
uint32_t getSize ()
 Retrieves the file size of a directory entry. More...
 
uint32_t getAttr ()
 Retrieves the file attributes of a directory entry. More...
 
uint32_t getUID (int uididx)
 Retrieves the UIDs of a directory entry. More...
 
PlpUIDgetUID ()
 Retrieves the PlpUID object of a directory entry. More...
 
const char * getName ()
 Retrieve the file name of a directory entry. More...
 
PsiTime getPsiTime ()
 Retrieve the modification time of a directory entry. More...
 
void setName (const char *str)
 Set the file name of a directory entry. More...
 
PlpDirentoperator= (const PlpDirent &e)
 Assignment operator Mainly used by STL container classes. More...
 

Private Attributes

uint32_t size
 
uint32_t attr
 
PlpUID UID
 
PsiTime time
 
std::string attrstr
 
std::string name
 

Friends

class rfsv32
 
class rfsv16
 
std::ostreamoperator<< (std::ostream &o, const PlpDirent &e)
 Prints the object contents. More...
 

Detailed Description

A class, representing a directory entry of the Psion.

Objects of this type are used by rfsv::readdir , rfsv::dir and rfsv::fgeteattr for returning the entries of a directory.

Author
Fritz Elfert felfe.nosp@m.rt@t.nosp@m.o.com

Definition at line 78 of file plpdirent.h.

Constructor & Destructor Documentation

◆ PlpDirent() [1/3]

PlpDirent::PlpDirent ( )

Default constructor.

Definition at line 42 of file plpdirent.cc.

◆ PlpDirent() [2/3]

PlpDirent::PlpDirent ( const PlpDirent d)

A copy constructor.

Mainly used by STL container classes.

Parameters
dThe object to be used as initializer.

Definition at line 46 of file plpdirent.cc.

◆ PlpDirent() [3/3]

PlpDirent::PlpDirent ( const uint32_t  size,
const uint32_t  attr,
const uint32_t  tHi,
const uint32_t  tLo,
const char *const  name 
)

Initializing Constructor.

Definition at line 55 of file plpdirent.cc.

◆ ~PlpDirent()

PlpDirent::~PlpDirent ( )
inline

Default destructor.

Definition at line 105 of file plpdirent.h.

Member Function Documentation

◆ getAttr()

uint32_t PlpDirent::getAttr ( )

Retrieves the file attributes of a directory entry.

Returns
The generic attributes ( rfsv::file_attribs ).

Definition at line 71 of file plpdirent.cc.

◆ getName()

const char * PlpDirent::getName ( )

Retrieve the file name of a directory entry.

Returns
The name of the file.

Definition at line 88 of file plpdirent.cc.

◆ getPsiTime()

PsiTime PlpDirent::getPsiTime ( )

Retrieve the modification time of a directory entry.

Returns
A PsiTime object, representing the time.

Definition at line 93 of file plpdirent.cc.

◆ getSize()

uint32_t PlpDirent::getSize ( )

Retrieves the file size of a directory entry.

Returns
The file size in bytes.

Definition at line 66 of file plpdirent.cc.

◆ getUID() [1/2]

PlpUID & PlpDirent::getUID ( )

Retrieves the PlpUID object of a directory entry.

Returns
The PlpUID object.

Definition at line 83 of file plpdirent.cc.

◆ getUID() [2/2]

uint32_t PlpDirent::getUID ( int  uididx)

Retrieves the UIDs of a directory entry.

This method returns always 0 with a Series3.

Parameters
uididxThe index of the UID to retrieve (0 .. 2).
Returns
The selected UID or 0 if the index is out of range.

Definition at line 76 of file plpdirent.cc.

◆ operator=()

PlpDirent & PlpDirent::operator= ( const PlpDirent e)

Assignment operator Mainly used by STL container classes.

Parameters
eThe new value to assign.
Returns
The modified object.

Definition at line 103 of file plpdirent.cc.

◆ setName()

void PlpDirent::setName ( const char *  str)

Set the file name of a directory entry.

This is currently unused. It does NOT change the name of the corresponding file on the Psion.

Parameters
strThe new name of the file.

Definition at line 98 of file plpdirent.cc.

Friends And Related Function Documentation

◆ operator<<

std::ostream & operator<< ( std::ostream o,
const PlpDirent e 
)
friend

Prints the object contents.

The output is in human readable similar to the output of a "ls" command.

Definition at line 114 of file plpdirent.cc.

◆ rfsv16

friend class rfsv16
friend

Definition at line 80 of file plpdirent.h.

◆ rfsv32

friend class rfsv32
friend

Definition at line 79 of file plpdirent.h.

Member Data Documentation

◆ attr

uint32_t PlpDirent::attr
private

Definition at line 181 of file plpdirent.h.

◆ attrstr

std::string PlpDirent::attrstr
private

Definition at line 184 of file plpdirent.h.

◆ name

std::string PlpDirent::name
private

Definition at line 185 of file plpdirent.h.

◆ size

uint32_t PlpDirent::size
private

Definition at line 180 of file plpdirent.h.

◆ time

PsiTime PlpDirent::time
private

Definition at line 183 of file plpdirent.h.

◆ UID

PlpUID PlpDirent::UID
private

Definition at line 182 of file plpdirent.h.


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