#include <s32file.h>
class RFileWriteStream : public RWriteStream |
Public Member Functions | |
---|---|
RFileWriteStream() | |
RFileWriteStream(const MExternalizer< TStreamRef > &) | |
RFileWriteStream(RFile &, TInt) | |
IMPORT_C void | Attach(RFile &, TInt) |
IMPORT_C TInt | Create(RFs &, const TDesC &, TUint) |
IMPORT_C TInt | Open(RFs &, const TDesC &, TUint) |
IMPORT_C TInt | Replace(RFs &, const TDesC &, TUint) |
IMPORT_C TInt | Temp(RFs &, const TDesC &, TFileName &, TUint) |
Supports the writing of a stream to a file.
RFileWriteStream | ( | const MExternalizer< TStreamRef > & | anExter | ) | [inline] |
Constructs the write stream object, associates it with an already opened file, and prepares the stream for writing.
Parameter | Description |
---|---|
aFile | A reference to the opened file. |
aPos | The offset into the file where the stream is to be written. Defaults to zero. |
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
Parameter | Description |
---|---|
aFs | Handle to a file server session. |
aName | The full path name of the new file. A file with this name must not already exist. |
aFileMode | The 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.
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
Parameter | Description |
---|---|
aFs | Handle to a file server session. |
aName | The full path name of the file. |
aFileMode | The 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.
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
Parameter | Description |
---|---|
aFs | Handle to a file server session. |
aName | The full path name of the file. |
aFileMode | The 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.
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
Parameter | Description |
---|---|
aFs | Handle to a file server session. |
aPath | The path where the new file is to be created. |
aName | On return, contains the full path name of the new file. |
aFileMode | The 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.