CFileBase Class Reference

class CFileBase : public CBase

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.

CFileMan

Inherits from

Constructor & Destructor Documentation

CFileBase(RFs &)

IMPORT_C CFileBase ( RFs & anFs ) [protected]

Protected default constructor.

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

Parameters

RFs & anFs File server session.

~CFileBase()

IMPORT_C ~CFileBase ( ) [protected]

Destructor.

Frees resources prior to destruction of the object.

Member Functions Documentation

AbbreviatedPath()

IMPORT_C TPtrC AbbreviatedPath ( )

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.

CompleteOperationL()

void CompleteOperationL ( ) [protected, inline, virtual]

Called from RunL to perform tidy up after an operation.

CFileMan CFileBase::RunL

ConstructL()

IMPORT_C void ConstructL ( ) [protected]

Second phase constructor.

CurrentEntry()

IMPORT_C const TEntry & CurrentEntry ( )

Gets the entry currently being processed.

DoOperationL()

void DoOperationL ( ) [protected, pure virtual]

Called from RunL to perform the requested operation.

CFileMan CFileBase::RunL

FullPath()

IMPORT_C TPtrC FullPath ( )

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

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

GetLastError()

IMPORT_C TInt GetLastError ( )

Gets the latest error code returned during a CFileMan operation.

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

GetMoreInfoAboutError()

IMPORT_C TFileManError GetMoreInfoAboutError ( )

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() .

CFileMan CFileBase::GetLastError()

RunInSeparateThreadL(TThreadFunction)

IMPORT_C void RunInSeparateThreadL ( TThreadFunction aThreadFunction ) [protected]

Creates a separate thread to run the command.

Parameters

TThreadFunction aThreadFunction The thread function.

RunL()

IMPORT_C void RunL ( ) [protected]

Executes a command.

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

SetObserver(MFileManObserver *)

IMPORT_C void SetObserver ( MFileManObserver * anObserver )

Sets the observer.

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

CFileMan MFileManObserver

Parameters

MFileManObserver * anObserver File management observer.

Member Data Documentation

TInt iCurrentEntry

TInt iCurrentEntry [protected]

CDir * iDirList

CDir * iDirList [protected]

TFileManError iErrorInfo

TFileManError iErrorInfo [protected]

RThread iFManThread

RThread iFManThread [protected]

RFs iFs

RFs iFs [protected]

RFs iFsOld

RFs iFsOld [protected]

TInt iLastError

TInt iLastError [protected]

TUint iMatchEntry

TUint iMatchEntry [protected]

TInt iNumberOfFilesProcessed

TInt iNumberOfFilesProcessed [protected]

MFileManObserver * iObserver

MFileManObserver * iObserver [protected]

CDirScan * iScanner

CDirScan * iScanner [protected]

HBufC * iSessionPath

HBufC * iSessionPath [protected]

TParse iSrcFile

TParse iSrcFile [protected]

TRequestStatus * iStatus

TRequestStatus * iStatus [protected]

TUint iSwitches

TUint iSwitches [protected]

RSemaphore iSynchronizer

RSemaphore iSynchronizer [protected]