Symbian
Symbian OS Library

SYMBIAN OS V9.3

[Index] [Spacer] [Previous] [Next]



Location: S32FILE.H
Link against: estor.lib

Class RFileWriteStream

class RFileWriteStream : public RWriteStream;

Description

Supports the writing of a stream to a file.

Derivation

Members

Defined in RFileWriteStream:
Attach(), Create(), Open(), RFileWriteStream(), RFileWriteStream(), RFileWriteStream(), Replace(), Temp()

Inherited from RWriteStream:
Close(), CommitL(), Detach(), Pop(), PushL(), Release(), Sink(), WriteInt16L(), WriteInt32L(), WriteInt8L(), WriteL(), WriteReal32L(), WriteReal64L(), WriteUint16L(), WriteUint32L(), WriteUint8L()


Construction and destruction


RFileWriteStream()

inline RFileWriteStream();

Description

Constructs an empty write stream object.


RFileWriteStream()

inline RFileWriteStream(const MExternalizer< TStreamRef > &anExter);

Description

Parameters

const MExternalizer< TStreamRef > &anExter


RFileWriteStream()

IMPORT_C RFileWriteStream(RFile &aFile, TInt aPos=0);

Description

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

Parameters

RFile &aFile

A reference to the opened file.

TInt aPos

The offset into the file where the stream is to be written. Defaults to zero.

[Top]


Member functions


Open()

IMPORT_C TInt Open(RFs &aFs, const TDesC &aName, TUint aFileMode);

Description

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

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

Parameters

RFs &aFs

Handle to a file server session.

const TDesC &aName

The full path name of the file.

TUint aFileMode

The mode in which the file is to be accessed. The mode is defined by by the TFileMode type.

Return value

TInt

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

See also:


Create()

IMPORT_C TInt Create(RFs &aFs, const TDesC &aName, TUint aFileMode);

Description

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.

Parameters

RFs &aFs

Handle to a file server session.

const TDesC &aName

The full path name of the new file. A file with this name must not already exist.

TUint aFileMode

The mode in which the file is to be accessed. The mode is defined by by the TFileMode type.

Return value

TInt

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

See also:


Replace()

IMPORT_C TInt Replace(RFs &aFs, const TDesC &aName, TUint aFileMode);

Description

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.

Parameters

RFs &aFs

Handle to a file server session.

const TDesC &aName

The full path name of the file.

TUint aFileMode

The mode in which the file is to be accessed. The mode is defined by by the TFileMode type.

Return value

TInt

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

See also:


Temp()

IMPORT_C TInt Temp(RFs &aFs, const TDesC &aPath, TFileName &aName, TUint aFileMode);

Description

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.

Parameters

RFs &aFs

Handle to a file server session.

const TDesC &aPath

The path where the new file is to be created.

TFileName &aName

On return, contains the full path name of the new file.

TUint aFileMode

The mode in which the file is to be accessed. The mode is defined by by the TFileMode type.

Return value

TInt

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

See also:


Attach()

IMPORT_C void Attach(RFile &aFile, TInt aPos=0);

Description

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

Parameters

RFile &aFile

A reference to the opened file.

TInt aPos

The offset into the file where the stream is to be written. Defaults to zero.