#include <f32file.h>
class CFileBase : public CBase |
Public Member Functions | |
---|---|
IMPORT_C TPtrC | AbbreviatedPath() |
IMPORT_C const TEntry & | CurrentEntry() |
IMPORT_C TPtrC | FullPath() |
IMPORT_C TInt | GetLastError() |
IMPORT_C TFileManError | GetMoreInfoAboutError() |
IMPORT_C void | SetObserver(MFileManObserver *) |
Protected Member Functions | |
---|---|
CFileBase(RFs &) | |
~CFileBase() | |
virtual void | CompleteOperationL() |
IMPORT_C void | ConstructL() |
pure virtual void | DoOperationL() |
IMPORT_C void | RunInSeparateThreadL(TThreadFunction) |
IMPORT_C void | RunL() |
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.
See also: CFileMan
IMPORT_C | CFileBase | ( | RFs & | anFs | ) | [protected] |
Protected default constructor.
Note that the class is intended only as an abstract base for other classes.
Parameter | Description |
---|---|
anFs | File server session. |
IMPORT_C | ~CFileBase | ( | ) | [protected] |
Destructor.
Frees resources prior to destruction of the object.
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.
Returns: The abbreviated path.
void | CompleteOperationL | ( | ) | [protected, inline, virtual] |
Called from RunL to perform tidy up after an operation.
See also: CFileMan CFileBase::RunL
IMPORT_C const TEntry & | CurrentEntry | ( | ) |
Gets the entry currently being processed.
Returns: Contains the current entry.
void | DoOperationL | ( | ) | [protected, pure virtual] |
Called from RunL to perform the requested operation.
See also: CFileMan CFileBase::RunL
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.
Returns: The full path.
IMPORT_C TInt | GetLastError | ( | ) |
Gets the latest error code returned during a CFileMan operation.
This function may be called from MFileManObserver::NotifyFileManEnded().
Returns: KErrNone, or another error code that might have been returned by a CFileMan operation.
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().
See also: CFileMan CFileBase::GetLastError()
Returns: The extra information about the last CFileMan error.
IMPORT_C void | RunInSeparateThreadL | ( | TThreadFunction | aThreadFunction | ) | [protected] |
Creates a separate thread to run the command.
Parameter | Description |
---|---|
aThreadFunction | The thread function. |
IMPORT_C void | RunL | ( | ) | [protected] |
Executes a command.
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.
See also: CFileMan MFileManObserver
Parameter | Description |
---|---|
anObserver | File management observer. |