Symbian
 Developer Library

DEVELOPER LIBRARY

[Index] [Glossary] [Previous] [Next]



Location: bafindf.h

Class CFindFileByType

CFindFileByType

Support

Supported from 5.0

Description

Searches for files based on name or wild characters and the files type.

Derivation

CBaseBase class for all classes to be instantiated on the heap
CFindFileByTypeSearches for files based on name or wild characters and the files type

Defined in CFindFileByType:
CFindFileByType(), CloseDir(), Entry(), File(), FindFirst(), FindNext(), iCurrentFile, iDir, iFile, iFind, iType

Inherited from CBase:
operator new()


Construction and destruction


CFindFileByType()

CFindFileByType(RFs& aFs);

Description

Constructs the object with a file server session.

Parameters

RFs& aFs

File server session.

[Top]


Member functions


FindFirst()

TInt FindFirst(const TDesC& aName, const TDesC& aDir, const TUidType& aType);

Description

Searches for one or more files in the directories contained in a path list.

Wildcard characters can be specified. The search ends when one or more file names matching aName and aType is found, or when every directory in the path list has been unsuccessfully searched.

Parameters

const TDesC& aName

File name to search for. If a path is specified, it overrides the path specified in aDir. If no path is specified, the path contained in aDir is used.

const TDesC& aDir

Single path indicating a directory to search on each drive.

const TUidType& aType

The type of file to search for.

Return value

TInt

KErrNone if the file was found, KErrNotFound if not.


FindNext()

TInt FindNext();

Description

Searches for the next file in the list of matching files found by FindFirst().

Return value

TInt

KErrNone if the file was found, KErrNotFound if not.


Entry()

const TEntry& Entry() const;

Description

Gets the pointer to the TEntry object for the current file.

This function returns the pointer to the TEntry object for the current file in the list of found files. Use this object to retrieve information about the file such as, its size, the last time it was modified and so on.

To retrieve path component information for the current file, first use File() and then the functions of TParse and TParseBase.

Return value

const TEntry&

A pointer to the TEntry object.


File()

const TParse& File() const;

Description

Gets the pointer to the TParse object for the current file.

This function returns the pointer to the TParse object for the current file in the list of found files. Use the getter functions of TParse and its base class TParseBase to retrieve the path and file name components of the object.

More information on retrieving path and file name components can be found in Using TParse.

To retrieve attribute information about the current file, first use Entry() and then the functions of TEntry.

Return value

const TParse&

A pointer to the TParse object.

[Top]


Internal members


CloseDir()

private: void CloseDir();

Description

This member is internal and not intended for use.


iType

private: TUidType iType;

Description

This member is internal and not intended for use.


iDir

private: CDir* iDir;

Description

This member is internal and not intended for use.


iCurrentFile

private: TInt iCurrentFile;

Description

This member is internal and not intended for use.


iFile

private: TParse iFile;

Description

This member is internal and not intended for use.


iFind

private: TFindFile iFind;

Description

This member is internal and not intended for use.