Symbian
Symbian OS Library

SYMBIAN OS V9.3

[Index] [Spacer] [Previous] [Next]



Location: f32file.h
Link against: efsrv.lib

Class CFileBase

class CFileBase : public CBase;

Description

Abstract base class for file management.

It provides functions to set an observer for the derived class CFileMan, and to get information about the entry being processed.

Derivation

Members

Defined in CFileBase:
AbbreviatedPath(), CFileBase(), CompleteOperationL(), ConstructL(), CurrentEntry(), DoOperationL(), FullPath(), GetLastError(), GetMoreInfoAboutError(), RunInSeparateThreadL(), RunL(), SetObserver(), iCurrentEntry, iDirList, iErrorInfo, iFManThread, iFs, iFsOld, iLastError, iMatchEntry, iNumberOfFilesProcessed, iObserver, iScanner, iSessionPath, iSrcFile, iStatus, iSwitches, iSynchronizer, ~CFileBase()

Inherited from CBase:
Delete(), Extension_(), operator new()

See also:


Construction and destruction


CFileBase()

protected: IMPORT_C CFileBase(RFs &anFs);

Description

Protected default constructor.

Note that the class is intended only as an abstract base for other classes.

Parameters

RFs &anFs

File server session.


ConstructL()

protected: IMPORT_C void ConstructL();

Description

Second phase constructor.


~CFileBase()

protected: IMPORT_C ~CFileBase();

Description

Destructor.

Frees resources prior to destruction of the object.

[Top]


Member functions


SetObserver()

IMPORT_C void SetObserver(MFileManObserver *anObserver);

Description

Sets the observer.

Use this function to provide CFileMan with an MFileManObserver, or, if one already exists, to change the observer.

Parameters

MFileManObserver *anObserver

File management observer.

See also:


CurrentEntry()

IMPORT_C const TEntry &CurrentEntry();

Description

Gets the entry currently being processed.

Return value

const TEntry &

Contains the current entry.


AbbreviatedPath()

IMPORT_C TPtrC AbbreviatedPath();

Description

Gets the abbreviated path of the file or directory currently being processed.

The abbreviated path is its path relative to the top level directory specified in the operation.

Return value

TPtrC

The abbreviated path.


FullPath()

IMPORT_C TPtrC FullPath();

Description

Gets the full path of the file or directory currently being processed.

The full path includes the drive letter, path and filename.

Return value

TPtrC

The full path.


GetLastError()

IMPORT_C TInt GetLastError();

Description

Gets the latest error code returned during a CFileMan operation.

This function may be called from MFileManObserver::NotifyFileManEnded().

Return value

TInt

KErrNone, or another error code that might have been returned by a CFileMan operation.


GetMoreInfoAboutError()

IMPORT_C TFileManError GetMoreInfoAboutError();

Description

Gets additional information about the latest error returned during a CFileMan operation.

For example, if a rename fails, this function can be used to report whether the source or target name caused the problem. This information supplements that provided GetLastError().

Return value

TFileManError

The extra information about the last CFileMan error.

See also:


RunL()

Capability: Dependent the capabilities required by this method, of the abstract class CFileBase, will be dependent on and provided by the concrete-class implementation of the DoOperationL method

protected: IMPORT_C void RunL();

Description

Executes a command.


RunInSeparateThreadL()

protected: IMPORT_C void RunInSeparateThreadL(TThreadFunction aThreadFunction);

Description

Creates a separate thread to run the command.

Parameters

TThreadFunction aThreadFunction

The thread function.


CompleteOperationL()

protected: inline virtual void CompleteOperationL();

Description

Called from RunL to perform tidy up after an operation.

See also:


DoOperationL()

protected: virtual void DoOperationL()=0;

Description

Called from RunL to perform the requested operation.

See also:

[Top]


Member data


iFs

protected: RFs iFs;

Description


iFsOld

protected: RFs iFsOld;

Description


iFManThread

protected: RThread iFManThread;

Description


iSynchronizer

protected: RSemaphore iSynchronizer;

Description


iScanner

protected: CDirScan * iScanner;

Description


iDirList

protected: CDir * iDirList;

Description


iCurrentEntry

protected: TInt iCurrentEntry;

Description


iMatchEntry

protected: TUint iMatchEntry;

Description


iSwitches

protected: TUint iSwitches;

Description


iSrcFile

protected: TParse iSrcFile;

Description


iObserver

protected: MFileManObserver * iObserver;

Description


iLastError

protected: TInt iLastError;

Description


iErrorInfo

protected: TFileManError iErrorInfo;

Description


iStatus

protected: TRequestStatus * iStatus;

Description


iSessionPath

protected: HBufC * iSessionPath;

Description


iNumberOfFilesProcessed

protected: TInt iNumberOfFilesProcessed;

Description