TEntry Class Reference

#include <f32file.h>

Link against: efsrv.lib

class TEntry

Detailed Description

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.

See also: RDir RFs::Entry RFs::SetEntry CfileBase::CurrentEntry

Member Attribute Documentation

iAtt

TUint iAtt

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

See also: KEntryAttNormal KEntryAttReadOnly KEntryAttHidden KEntryAttSystem

iModified

TTime iModified

The local time of last modification.

iName

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

See also: KMaxFileName

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.

iType

TUidType iType

The file's UIDtype

Constructor & Destructor Documentation

TEntry ( )

IMPORT_CTEntry()

Default constructor.

TEntry ( const TEntry & )

IMPORT_CTEntry(const TEntry &aEntry)

Copy constructor.

ParameterDescription
aEntryThe TEntry object to be copied.

Member Function Documentation

FileSize ( )

IMPORT_C TInt64FileSize()const

IsArchive ( )

IMPORT_C TBoolIsArchive()const

Tests whether the file is an archive file.

See also: KEntryAttArchive

Returns: ETrue if file is archive, EFalse if not.

IsDir ( )

IMPORT_C TBoolIsDir()const

Tests whether the entry is a directory.

See also: KEntryAttDir

Returns: ETrue if entry indicates a directory, EFalse if not.

IsHidden ( )

IMPORT_C TBoolIsHidden()const

Tests whether the file or directory is hidden.

See also: KEntryAttHidden

Returns: ETrue if entry is hidden, EFalse if not.

IsReadOnly ( )

IMPORT_C TBoolIsReadOnly()const

Tests whether the file or directory is read-only.

See also: KEntryAttReadOnly

Returns: ETrue if entry is read-only, EFalse if not.

IsSystem ( )

IMPORT_C TBoolIsSystem()const

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

See also: KEntryAttSystem

Returns: ETrue if entry is a system entry, EFalse if not.

IsTypeValid ( )

TBool IsTypeValid()const [inline]

Test whether the file has a valid UID.

See also: TUidType::IsValid TUidType

Returns: True if the entry has a valid UID, false otherwise.

IsUidPresent ( TUid )

TBool IsUidPresent(TUidaUid)const [inline]

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

See also: TUidType::IsPresent TUidType

ParameterDescription
aUidThe UID to be checked.

Returns: True if the specified UID is present, false otherwise.

MostDerivedUid ( )

TUid MostDerivedUid()const [inline]

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

See also: TUidType::MostDerived TUidType

Returns: The entry's most derived UID.

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.

See also: TEntry::iSize

operator= ( const TEntry & )

IMPORT_C TEntry &operator=(const TEntry &aEntry)

Assignment operator.

ParameterDescription
aEntryThe TEntry object to be copied to this TEntry object.

Returns: A reference to this TEntry object.

operator[] ( TInt )

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

Gets any one of the file's three UIDs.

See also: TUidType

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

Returns: On return, contains the requested UID.