Symbian Developer Library

SYMBIAN OS V6.1 EDITION FOR C++

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



Location: f32file.h
Link against: efsrv.lib

Class CFileBase

CFileBase

Support

Supported from 5.0

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

CBaseBase class for all classes to be instantiated on the heap
CFileBaseAbstract base class for file management

Defined in CFileBase:
AbbreviatedPath(), CFileBase(), CurrentEntry(), FullPath(), GetLastError(), GetMoreInfoAboutError(), SetObserver()

Inherited from CBase:
operator new()


Construction and initialisation


CFileBase()

protected: CFileBase(RFs& anFs);

Description

Protected default C++ constructor. The class is intended only as an abstract base for other classes.

Parameters

RFs& anFs

File server session.


SetObserver()

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

[Top]


Enquiry functions


CurrentEntry()

const TEntry& CurrentEntry();

Description

Returns the entry currently being processed.

Return value

TEntry&

On return contains the current entry


AbbreviatedPath()

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

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

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

TFileManError GetMoreInfoAboutError();

Description

Gets additional information about the latest error returned during aCFileMan 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 byGetLastError().

Return value

TFileManError

Provides extra information about the last CFileManerror.