Symbian Developer Library

SYMBIAN OS V6.1 EDITION FOR C++

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



Location: f32file.h
Link against: efsrv.lib

Class MFileManObserver

MFileManObserver

Support

Supported from 5.0

Description

Notification of the progress of synchronous or asynchronous file management operations — interface class. It should be inherited by classes which implement this protocol.

The enquiry functions provided by CFileBase and CFileMan may be used by the observer to display information about the progress of the operation such as error messages, the names of the target and destination files, and the number of bytes transferred during a copy operation. Notification may take place before or after an entry has been processed, or during a file copy or move. Each notification function returns a value which can be used to enable the user to control the progress of the operation, for instance to cancel a long-running multiple file copy. To use this class, pass a pointer to an instance of the class to the CFileMan constructor, or use SetObserver(), defined in CFileBase.

Defined in MFileManObserver:
EAbort, ECancel, EContinue, ERetry, NotifyFileManEnded(), NotifyFileManOperation(), NotifyFileManStarted(), TControl


File management notification


NotifyFileManStarted()

virtual TControl NotifyFileManStarted();

Description

Notifies immediately before each entry is processed.

Return value

TControl

MFileManObserver::EContinue proceeds with processing the current file, MFileManObserver::ECancel skips processing the current file, moving to the next file, MFileManObserver::EAbort aborts the entire operation.


NotifyFileManOperation()

virtual TControl NotifyFileManOperation();

Description

Notifies during a file copy or move. Large files are copied and moved in stages. After each portion of the source file has been copied to the target, this function is called.

Note:

Return value

TControl

MFileManObserver::ECancel stops the operation, closing the source and target files. The current target file is not deleted. MFileManObserver::EContinue continues with the operation.


NotifyFileManEnded()

virtual TControl NotifyFileManEnded();

Description

Notifies immediately after a directory entry has been processed.

Note:

Return value

TControl

EContinue and ECancel proceed with processing the next entry, ERetry re-attempts to process the previous file, EAbort aborts the entire operation.

[Top]


Enumerations


Enum TControl

TControl

Description

Control for current CFileMan operation.

EContinue

Proceed with current or next entry

ERetry

Retry processing previous entry

EAbort

Abort operation, causes function to return KErrCancel.

ECancel

Cancel processing current entry