RFileWriteStream Class Reference

#include <s32file.h>

class RFileWriteStream : public RWriteStream

Inherits from

Detailed Description

Supports the writing of a stream to a file.

Constructor & Destructor Documentation

RFileWriteStream ( )

RFileWriteStream()[inline]

Constructs an empty write stream object.

RFileWriteStream ( const MExternalizer< TStreamRef > & )

RFileWriteStream(const MExternalizer< TStreamRef > &anExter)[inline]

RFileWriteStream ( RFile &, TInt )

IMPORT_CRFileWriteStream(RFile &aFile,
TIntaPos = 0
)

Constructs the write stream object, associates it with an already opened file, and prepares the stream for writing.

ParameterDescription
aFileA reference to the opened file.
aPosThe offset into the file where the stream is to be written. Defaults to zero.

Member Function Documentation

Attach ( RFile &, TInt )

IMPORT_C voidAttach(RFile &aFile,
TIntaPos = 0
)

Associates this stream with an already opened file and prepares the stream for writing.

ParameterDescription
aFileA reference to the opened file.
aPosThe offset into the file where the stream is to be written. Defaults to zero.

Create ( RFs &, const TDesC &, TUint )

IMPORT_C TIntCreate(RFs &aFs,
const TDesC &aName,
TUintaFileMode
)

Creates a new file, associates it with this stream, and prepares the stream for writing.

The stream will be written to offset zero in the file.

See also: TFileMode

ParameterDescription
aFsHandle to a file server session.
aNameThe full path name of the new file. A file with this name must not already exist.
aFileModeThe mode in which the file is to be accessed. The mode is defined by by the TFileMode type.

Returns: KErrNone, if successful; otherwise, one of the other system wide error codes.

Open ( RFs &, const TDesC &, TUint )

IMPORT_C TIntOpen(RFs &aFs,
const TDesC &aName,
TUintaFileMode
)

Opens a file containing a stream and prepares the stream for writing.

The stream will be written to offset zero in the file.

See also: TFileMode

ParameterDescription
aFsHandle to a file server session.
aNameThe full path name of the file.
aFileModeThe mode in which the file is to be accessed. The mode is defined by by the TFileMode type.

Returns: KErrNone, if successful; otherwise, one of the other system wide error codes.

Replace ( RFs &, const TDesC &, TUint )

IMPORT_C TIntReplace(RFs &aFs,
const TDesC &aName,
TUintaFileMode
)

Creates a new file, associates the file with this stream, and prepares the stream for writing.

The file replaces any existing file of the same name.

The stream will be written to offset zero in the file.

See also: TFileMode

ParameterDescription
aFsHandle to a file server session.
aNameThe full path name of the file.
aFileModeThe mode in which the file is to be accessed. The mode is defined by by the TFileMode type.

Returns: KErrNone, if successful; otherwise, one of the other system wide error codes.

Temp ( RFs &, const TDesC &, TFileName &, TUint )

IMPORT_C TIntTemp(RFs &aFs,
const TDesC &aPath,
TFileName &aName,
TUintaFileMode
)

Creates a temporary file, associates it with this stream, and prepares the stream for writing.

The new file is created in the specified path and a unique file name is generated by the file server.

Note that the store framework does not delete a temporary file after it is closed.

The stream will be written to offset zero in the file.

See also: TFileMode

ParameterDescription
aFsHandle to a file server session.
aPathThe path where the new file is to be created.
aNameOn return, contains the full path name of the new file.
aFileModeThe mode in which the file is to be accessed. The mode is defined by by the TFileMode type.

Returns: KErrNone, if successful; otherwise, one of the other system wide error codes.