class RFilePlugin : private RFile |
Public Member Functions | |
---|---|
RFilePlugin ( TFsPluginRequest &, TBool ) | |
~RFilePlugin () | |
IMPORT_C TInt | AdoptFromClient () |
IMPORT_C TInt | Att ( TUint &) |
IMPORT_C TInt | ChangeMode ( TFileMode ) |
IMPORT_C void | Close () |
IMPORT_C TInt | Create (const TDesC &, TUint ) |
IMPORT_C TInt | Flush () |
IMPORT_C TInt | Lock ( TInt64 , TInt64 ) |
IMPORT_C TInt | Modified ( TTime &) |
IMPORT_C TInt | Open (const TDesC &, TUint ) |
IMPORT_C TInt | Read ( TInt64 , TDes8 &) |
IMPORT_C TInt | Read ( TInt64 , TDes8 &, TInt ) |
IMPORT_C TInt | Rename (const TDesC &) |
IMPORT_C TInt | Replace (const TDesC &, TUint ) |
IMPORT_C TInt | Seek ( TSeek , TInt64 &) |
IMPORT_C TInt | Set (const TTime &, TUint , TUint ) |
IMPORT_C TInt | SetAtt ( TUint , TUint ) |
IMPORT_C TInt | SetModified (const TTime &) |
IMPORT_C TInt | SetSize ( TInt64 ) |
IMPORT_C TInt | Size ( TInt64 &) |
IMPORT_C TInt | Temp (const TDesC &, TFileName &, TUint ) |
IMPORT_C TInt | TransferToClient () |
IMPORT_C TInt | UnLock ( TInt64 , TInt64 ) |
IMPORT_C TInt | Write ( TInt64 , const TDesC8 &) |
IMPORT_C TInt | Write ( TInt64 , const TDesC8 &, TInt ) |
Protected Member Functions | |
---|---|
void | CloseSubSession ( TInt ) |
TInt | CreateSubSession (const RSessionBase &, TInt , const TIpcArgs &) |
TInt | SendReceive ( TInt , const TIpcArgs &) |
Private Member Functions | |
---|---|
RFilePlugin () | |
RFilePlugin (const RFilePlugin &) | |
void | SetHandle ( TInt ) |
void | SetSubSessionHandle ( TInt ) |
RFilePlugin & | operator= (const RFilePlugin &) |
Private Attributes | |
---|---|
TPluginSessionHelper | iSessionHelper |
IMPORT_C | RFilePlugin | ( | TFsPluginRequest & | aRequest, |
TBool | aDirectToDrive = EFalse | |||
) |
TFsPluginRequest & aRequest | |
TBool aDirectToDrive = EFalse |
RFilePlugin | ( | const RFilePlugin & | ) | [private] |
const RFilePlugin & |
IMPORT_C TInt | Att | ( | TUint & | aAttValue | ) | const |
Gets the file's attributes.
TUint & aAttValue | A bitmask which, on return, contains the file s attributes. For more information, see KEntryAttNormal and the other file/directory attributes. |
IMPORT_C TInt | ChangeMode | ( | TFileMode | aNewMode | ) |
Switches an open file's access mode between EFileShareExclusive and EFileShareReadersOnly.
This allows or disallows read-only access without having to close and re-open the file.
TFileMode aNewMode | The new access mode. |
IMPORT_C void | Close | ( | ) |
Closes the file.
Any open files are closed when the file server session is closed.
Close() is guaranteed to return, and provides no indication whether it completed successfully or not. When closing a file you have written to, you should ensure that data is committed to the file by invoking RFile::Flush() before closing. If Flush() completes successfully, Close() is essentially a no-operation.
TInt | CreateSubSession | ( | const RSessionBase & | aSession, |
TInt | aFunction, | |||
const TIpcArgs & | aArgs | |||
) | [protected] |
Creates a new sub-session within an existing session.
const RSessionBase & aSession | The session to which this sub-session will belong. |
TInt aFunction | The opcode specifying the requested service; the server should interpret this as a request to create a sub-session. |
const TIpcArgs & aArgs | The message arguments. |
IMPORT_C TInt | Flush | ( | ) |
Commits data to the storage device and flushes internal buffers without closing the file.
Although RFile::Close() also flushes internal buffers, it is often useful to call Flush() before a file is closed. This is because Close() returns no error information, so there is no way of telling whether the final data was written to the file successfully or not. Once data has been flushed, Close() is effectively a no-operation.
IMPORT_C TInt | Modified | ( | TTime & | aTime | ) | const |
Gets local date and time the file was last modified, in universal time.
TTime & aTime | On return, contains the date and time the file was last modified in UTC. |
IMPORT_C TInt | Rename | ( | const TDesC & | aNewName | ) |
Renames a file.
If aNewName specifies a different directory to the one in which the file is currently located, then the file is moved.
No other process may have access to the file, that is, the file must have been opened in EFileShareExclusive share mode, or an error is returned. The file must have been opened for writing (using EFileWrite access mode). An error is returned if a file with the new filename already exists in the target directory.
The file or directory may not be moved to another device by this means, either explicitly (by another drive specified in the name) or implicitly (because the directory has been mapped to another device with RFs::SetSubst() ).
Note that the function builds up the new file specification by using all of the path components specified in aNewName (directory path, filename and extension), then adding any missing components from the current file specification, and finally adding any missing components from the session path. A consequence of this is that you cannot rename a file to remove its extension. An alternative to this function is RFs::Rename() which renames the file using the new name as provided.
const TDesC & aNewName | The new file name and/or directory path. No part may contain wildcard characters or an error is returned. |
TInt | SendReceive | ( | TInt | aFunction, |
const TIpcArgs & | aArgs | |||
) | const [protected] |
Sends a message to the server and waits synchronously for a reply.
An opcode specifies the service required. A set of message arguments is passed that can be used to specify client addresses, which the server can use to read from and write to the client address space.
Note that this function will only fail if the server itself fails or environmental errors occur in the server. All requests made using this function are guaranteed to reach the server. This means that all synchronous client requests (typically those that return void) should be routed through this synchronous variant of SendReceive() .
IMPORT_C TInt | Set | ( | const TTime & | aTime, |
TUint | aSetAttMask, | |||
TUint | aClearAttMask | |||
) |
Sets the file s attributes, and the date and time it was last modified.
It combines the functionality of SetAtt() and SetModified()
An attempt to set or clear the KEntryAttDir, KEntryAttVolume or KEntryAttRemote attributes have no effect.
const TTime & aTime | The new date and time the file was last modified. UTC date and time should be used. |
TUint aSetAttMask | A bitmask indicating the file attributes to be set |
TUint aClearAttMask | A bitmask indicating the attributes to be cleared. For more information see KEntryAttNormal, and the other file/directory attributes. |
IMPORT_C TInt | SetAtt | ( | TUint | aSetAttMask, |
TUint | aClearAttMask | |||
) |
Sets or clears file attributes using two bitmasks.
The first mask controls which attributes are set. The second controls which attributes are cleared.
Notes:
1. The file must have been opened for writing, or an error is returned.
2. A panic is raised if any attribute is specified in both bitmasks.
3. An attempt to set or clear the KEntryAttDir, KEntryAttVolume or KEntryAttRemote attributes have no effect.
4. The new attribute values take effect when the file is flushed or closed (which implies a flush).
IMPORT_C TInt | SetModified | ( | const TTime & | aTime | ) |
Sets the date and time the file was last modified. UTC date and time should be used.
Notes:
1. The file must have been opened for writing, or an error is returned.
2. The new modified time takes effect when the file is flushed or closed (which implies a flush).
const TTime & aTime | The new date and time the file was last modified, in universal time. |
void | SetSubSessionHandle | ( | TInt | aHandle | ) | [private] |
TInt aHandle |
IMPORT_C TInt | Temp | ( | const TDesC & | aPath, |
TFileName & | aName, | |||
TUint | aFileMode | |||
) |
IMPORT_C TInt | Write | ( | TInt64 | aPos, |
const TDesC8 & | aDes, | |||
TInt | aLength | |||
) |
RFilePlugin & | operator= | ( | const RFilePlugin & | ) | [private] |
const RFilePlugin & |
Copyright ©2010 Nokia Corporation and/or its subsidiary(-ies).
All rights
reserved. Unless otherwise stated, these materials are provided under the terms of the Eclipse Public License
v1.0.