TEntry Class Reference

class TEntry

Encapsulates an entry in a directory, which can be another (nested) directory, a file or a volume label.

Each directory entry has a name which is relative to its owning directory and a type, which is indicated by its unique identifier (UID).

An entry can be interrogated for the following properties:

1. the kind of entry: stored in the entry UIDs, stored in iType

2. the entry attributes, stored in iAtt

3. the size of entry

4. the time the entry was last modified.

RDir RFs::Entry RFs::SetEntry CfileBase::CurrentEntry

Public Member Functions
TEntry()
TEntry(const TEntry &)
IMPORT_C TInt64FileSize()
IMPORT_C TBoolIsArchive()
IMPORT_C TBoolIsDir()
IMPORT_C TBoolIsHidden()
IMPORT_C TBoolIsReadOnly()
IMPORT_C TBoolIsSystem()
TBool IsTypeValid()
TBool IsUidPresent(TUid)
TUid MostDerivedUid()
voidSetFileSize(TInt64)
IMPORT_C TEntry &operator=(const TEntry &)
const TUid &operator[](TInt)
Private Member Functions
voidCopy(const TEntry &)
voidUnpack()
Public Attributes
TUint iAtt
TTime iModified
TBufC< KMaxFileName >iName
TInt iSize
TUidType iType
Private Attributes
TUint32 iReserved
TUint32 iSizeHigh

Constructor & Destructor Documentation

TEntry()

IMPORT_CTEntry()

Default constructor.

TEntry(const TEntry &)

IMPORT_CTEntry(const TEntry &aEntry)

Copy constructor.

Parameters

const TEntry & aEntryThe TEntry object to be copied.

Member Functions Documentation

Copy(const TEntry &)

voidCopy(const TEntry &aEntry)[private, inline]

Parameters

const TEntry & aEntry

FileSize()

IMPORT_C TInt64FileSize()const

IsArchive()

IMPORT_C TBoolIsArchive()const

Tests whether the file is an archive file.

KEntryAttArchive

IsDir()

IMPORT_C TBoolIsDir()const

Tests whether the entry is a directory.

KEntryAttDir

IsHidden()

IMPORT_C TBoolIsHidden()const

Tests whether the file or directory is hidden.

KEntryAttHidden

IsReadOnly()

IMPORT_C TBoolIsReadOnly()const

Tests whether the file or directory is read-only.

KEntryAttReadOnly

IsSystem()

IMPORT_C TBoolIsSystem()const

Tests whether the file or directory has the system attribute set.

KEntryAttSystem

IsTypeValid()

TBool IsTypeValid()const [inline]

Test whether the file has a valid UID.

TUidType::IsValid TUidType

IsUidPresent(TUid)

TBool IsUidPresent(TUidaUid)const [inline]

Tests whether the specified UID matches any of the UIDs in the UID type.

TUidType::IsPresent TUidType

Parameters

TUid aUidThe UID to be checked.

MostDerivedUid()

TUid MostDerivedUid()const [inline]

Gets the most derived (i.e. the most specific) UID.

TUidType::MostDerived TUidType

SetFileSize(TInt64)

voidSetFileSize(TInt64aFileSize)[inline]

Sets 64 bit file size.

The low word is stored in iSize and high word is stored in private data member iSizeHigh. This is intended to be used by File Systsem Plugin implementations, and not recommended to be called by general clients of the File Server.

TEntry::iSize

Parameters

TInt64 aFileSize

Unpack()

voidUnpack()[private, inline]

operator=(const TEntry &)

IMPORT_C TEntry &operator=(const TEntry &aEntry)

Assignment operator.

Parameters

const TEntry & aEntryThe TEntry object to be copied to this TEntry object.

operator[](TInt)

const TUid &operator[](TIntanIndex)const [inline]

Gets any one of the file's three UIDs.

TUidType

Parameters

TInt anIndexIdentifies the UID required. This can be zero, one or two. Specifiying any other value raises a panic.

Member Data Documentation

TUint iAtt

TUint iAtt

The individual bits within this byte indicate which attributes have been set.

KEntryAttNormal KEntryAttReadOnly KEntryAttHidden KEntryAttSystem

TTime iModified

TTime iModified

The local time of last modification.

TBufC< KMaxFileName > iName

TBufC< KMaxFileName >iName

The name of the file relative to the owning directory, with a maximum of KMaxFileName characters.

KMaxFileName

TUint32 iReserved

TUint32 iReserved[private]

Reserved for future expansion

TInt iSize

TInt iSize

The size of the file in bytes. For files larger that 2G it must be cast to TUint in order to avoid looking like negative signed.

TUint32 iSizeHigh

TUint32 iSizeHigh[private]

TUidType iType

TUidType iType

The file's UIDtype