Update contrib.
1 // Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies).
2 // All rights reserved.
3 // This component and the accompanying materials are made available
4 // under the terms of the License "Eclipse Public License v1.0"
5 // which accompanies this distribution, and is available
6 // at the URL "http://www.eclipse.org/legal/epl-v10.html".
8 // Initial Contributors:
9 // Nokia Corporation - initial contribution.
14 // f32\sfile\sf_plugin_util.cpp
21 Utility function to obtain the file name from a file share object
23 @param aFileShare A pointer to the file share
24 @param aName A reference to the descriptor to contain the file name
26 LOCAL_C void NameFromShare(CFileShare* aFileShare, TDes& aName)
30 CFileCB& theFile = aFileShare->File();
32 aName[0] = TText('A' + theFile.Drive().DriveNumber());
33 aName.Append(theFile.FileName());
38 Utility function for obtaining info on file duplicate or adopt requests.
40 @param aRequest File access request
41 @param aDriveNumber The drive number
42 @param aHandle sub-session handle
43 @param aAtt File attributes
45 @param aName Name of the file
46 @return File modification time in format of TTime
48 LOCAL_C TInt FileDuplicateAdoptVars(CFsRequest* aRequest, TInt& aDriveNumber, TInt& aHandle, TInt& aAtt, TInt& aSize, TDes& aName, TTime& aTime)
50 __ASSERT_ALWAYS(aRequest->Operation()->Function()==EFsFileDuplicate || aRequest->Operation()->Function()==EFsFileAdopt,Fault(EBaseRequestMessage));
52 aDriveNumber = aRequest->DriveNumber();
53 aHandle = aRequest->Message().Int0();
55 CFileShare* share = (CFileShare*)aRequest->ScratchValue();
57 return(KErrBadHandle);
59 NameFromShare(share, aName);
61 CFileCB& theFile = share->File();
63 aSize = theFile.Size();
64 aTime = theFile.Modified();
70 Utility function for obtaining info on file open requests.
72 @param aRequest File open request
73 @param aMode File Open Mode
74 @param aHandle File handle
75 @param aName File's name
77 LOCAL_C TInt FileOpenVar(CFsRequest* aRequest, TUint32& aMode, TInt& aHandle, TDes& aName)
79 __ASSERT_ALWAYS(aRequest->Operation()->Function()==EFsFileOpen,Fault(EBaseRequestMessage));
81 aMode = aRequest->Message().Int1();
82 TPtr8 handle((TUint8*)&aHandle,sizeof(TInt));
83 TRAPD(err,aRequest->ReadL(KMsgPtr3,handle));
90 aName = aRequest->Src().FullName();
96 Utility function for obtaining info on file Create/Replace requests.
98 @param aRequest File Create/Replace request
99 @param aMode File Create/Replace Mode
100 @param aName File's name
102 LOCAL_C TInt FileCreateReplaceVar(CFsRequest* aRequest, TUint32& aMode, TDes& aName)
104 __ASSERT_ALWAYS(aRequest->Operation()->Function()==EFsFileCreate || aRequest->Operation()->Function()==EFsFileReplace,Fault(EBaseRequestMessage));
106 aMode = aRequest->Message().Int1();
107 aName = aRequest->Src().FullName();
113 Utility function for obtaining info on file temp requests.
115 @param aRequest File temp request
116 @param aMode File Mode
117 @param aName File's name
118 @param aPath File's path
120 LOCAL_C TInt FileTempVar(CFsRequest* aRequest, TUint32& aMode, TDes& aName,TDes& aPath)
122 __ASSERT_ALWAYS(aRequest->Operation()->Function()==EFsFileTemp,Fault(EBaseRequestMessage));
124 aMode = aRequest->Message().Int1();
125 aPath = aRequest->Src().FullName();
127 TInt nameLen = aRequest->GetDesLength(KMsgPtr2);
128 if(nameLen < 0 || nameLen > KMaxFileName)
133 TRAPD(err, aRequest->ReadL(KMsgPtr2, aName));
138 Utility function for obtaining info on file read/write requests.
140 @param aRequest File access request
141 @param aLen The length of file for access
142 @param aPos Position of first byte to be accessed
143 @param aName File name
144 @return Client's buffer
146 LOCAL_C TInt FileAccessVars(CFsRequest* aRequest, TInt& aLen, TInt& aPos, TDes& aName, const TAny*& aPtr)
148 __ASSERT_ALWAYS(aRequest->Operation()->Function()==EFsFileRead || aRequest->Operation()->Function()==EFsFileWrite,Fault(EBaseRequestMessage));
150 TMsgOperation& currentOperation = ((CFsMessageRequest*) aRequest)->CurrentOperation();
151 aLen = currentOperation.iReadWriteArgs.iLength;
152 aPos = (TInt) currentOperation.iReadWriteArgs.iPos;
154 CFileShare* share = (CFileShare*)aRequest->ScratchValue();
156 return(KErrBadHandle);
158 NameFromShare(share, aName);
159 if (aPos == KCurrentPosition64)
161 aPos = (TInt)share->iPos;
164 aPtr = (TAny*)aRequest->Message().Ptr0();
170 Utility function for obtaining info on file lock/unlcok requests.
172 @param aRequest File lock request
173 @param aLen The length of file
174 @param aPos Position of first byte
175 @param aName File name
177 LOCAL_C TInt FileLockVars(CFsRequest* aRequest, TInt& aLen, TInt& aPos, TDes& aName)
179 __ASSERT_ALWAYS(aRequest->Operation()->Function()==EFsFileLock || aRequest->Operation()->Function()==EFsFileUnLock,Fault(EBaseRequestMessage));
181 aLen = aRequest->Message().Int0();
182 aPos = aRequest->Message().Int1();
184 CFileShare* share = (CFileShare*)aRequest->ScratchValue();
186 return(KErrBadHandle);
188 NameFromShare(share, aName);
194 Utility function for obtaining info on file seek requests.
196 @param aRequest File seek request
197 @param aPos The position within the file
198 @param aName File name
199 @return Seek mode in format of TSeek
201 LOCAL_C TInt FileSeekVars(CFsRequest* aRequest, TInt& aPos, TDes& aName, const TAny*& aPtr)
203 __ASSERT_ALWAYS(aRequest->Operation()->Function()==EFsFileSeek,Fault(EBaseRequestMessage));
205 aPos = aRequest->Message().Int0();
207 CFileShare* share = (CFileShare*)aRequest->ScratchValue();
209 return(KErrBadHandle);
211 NameFromShare(share, aName);
213 aPtr = aRequest->Message().Ptr1();
219 Utility function for obtaining info on file flush requests.
221 @param aRequest File flush request
222 @param aName File name
224 LOCAL_C TInt FileFlushVars(CFsRequest* aRequest, TDes& aName)
226 __ASSERT_ALWAYS(aRequest->Operation()->Function()==EFsFileFlush,Fault(EBaseRequestMessage));
228 CFileShare* share = (CFileShare*)aRequest->ScratchValue();
230 return(KErrBadHandle);
232 NameFromShare(share, aName);
238 Utility function for obtaining info on file size/SetSize requests.
240 @param aRequest File Size/SetSize request
241 @param aSize In case of Size() it is client's buffer, otherwise it is the desired size for SetSize
242 @param aName File name
244 LOCAL_C TInt FileSizeVars(CFsRequest* aRequest,TInt& aSize, TDes& aName)
246 __ASSERT_ALWAYS(aRequest->Operation()->Function()==EFsFileSize || aRequest->Operation()->Function()==EFsFileSetSize,Fault(EBaseRequestMessage));
248 aSize = aRequest->Message().Int0();
250 CFileShare* share = (CFileShare*)aRequest->ScratchValue();
252 return(KErrBadHandle);
254 NameFromShare(share, aName);
260 Utility function for obtaining info on file Att requests.
262 @param aRequest File Att request
263 @param aAtt Attribute of the file in question.
264 @param aName File name
266 LOCAL_C TInt FileAttVars(CFsRequest* aRequest,TInt& aAtt, TDes& aName)
268 __ASSERT_ALWAYS(aRequest->Operation()->Function()==EFsFileAtt,Fault(EBaseRequestMessage));
270 CFileShare* share = (CFileShare*)aRequest->ScratchValue();
272 return(KErrBadHandle);
274 aAtt = (TInt)share->File().Att();
275 NameFromShare(share, aName);
281 Utility function for obtaining info on file SetAtt requests.
283 @param aRequest File SetAtt request
284 @param aAtt Current Attribute of the file
285 @param aName File name
286 @param aSetAttMask The attribute mask to be set
287 @param aClearAttMask The attribute mask to be cleared
289 LOCAL_C TInt FileSetAttVars(CFsRequest* aRequest,TInt& aAtt, TDes& aName, TUint& aSetAttMask,TUint& aClearAttMask)
291 __ASSERT_ALWAYS(aRequest->Operation()->Function()==EFsFileSetAtt,Fault(EBaseRequestMessage));
293 CFileShare* share=(CFileShare*)aRequest->ScratchValue();
295 return(KErrBadHandle);
297 aAtt = (TInt)share->File().Att();
298 NameFromShare(share, aName);
300 aSetAttMask = aRequest->Message().Int0();
301 aClearAttMask = aRequest->Message().Int1();
307 Utility function for obtaining info on file modification requests.
309 @param aRequest File Modified/SetModified request
310 @param aAtt Current Attribute of the file
311 @param aSize Current size of the file
312 @param aName File name
313 @param Moidfied Last modified time of the file
314 @return if request is Modified, returns clients buffer
315 if request is SetModified returns the desired last modification time
317 LOCAL_C TInt FileModificationVars(CFsRequest* aRequest,TInt& aAtt, TInt& aSize, TDes& aName, TTime& aModified, TTime& aOldTime)
319 __ASSERT_ALWAYS(aRequest->Operation()->Function()==EFsFileModified || aRequest->Operation()->Function()==EFsFileSetModified,Fault(EBaseRequestMessage));
321 CFileShare* share = (CFileShare*)aRequest->ScratchValue();
323 return(KErrBadHandle);
325 NameFromShare(share, aName);
327 CFileCB& file = share->File();
330 aOldTime = file.Modified();
332 TPtr8 timePkg((TUint8*)&aModified, sizeof(TTime));
333 TRAPD(err, aRequest->ReadL(KMsgPtr0, timePkg));
339 Utility function for obtaining info on file Set requests.
341 @param aRequest File Set request
342 @param aName File name
343 @param aCurrentAtt Current Attribute of the file
344 @param aNewSetAtt The new attribute to be set
345 @param aNewClearAtt The attribute to be cleared
346 @param aCurrentModified Last modified time of the file
347 @param aNewModified New last modified time of the file
349 LOCAL_C TInt FileSetVars(CFsRequest* aRequest, TDes& aName, TInt& aCurrentAtt,TInt& aNewSetAtt, TInt& aNewClearAtt, TTime& aCurrentModified, TTime& aNewModified)
351 __ASSERT_ALWAYS(aRequest->Operation()->Function()==EFsFileSet,Fault(EBaseRequestMessage));
353 CFileShare* share = (CFileShare*)aRequest->ScratchValue();
355 return(KErrBadHandle);
357 NameFromShare(share, aName);
359 CFileCB& file = share->File();
360 aCurrentAtt= file.Att();
361 aCurrentModified = file.Modified();
363 aNewSetAtt = aRequest->Message().Int1();
364 aNewClearAtt = aRequest->Message().Int2();
366 TPtr8 timePkg((TUint8*)&aNewModified, sizeof(TTime));
367 TRAPD(err, aRequest->ReadL(KMsgPtr0, timePkg));
372 Utility function for obtaining info on file ChangeMode requests.
374 @param aRequest File Set request
375 @param aName File name
376 @param aCurrentMode Current mode of the file
377 @param aNewMode The new mode of file (switch between EFileShareExclusive and EFileShareReadersOnly
378 @param aModified Last modified time of the file
380 LOCAL_C TInt FileChangeModeVars(CFsRequest* aRequest, TDes& aName, TInt& aCurrentMode,TInt& aNewMode, TTime& aModified)
382 __ASSERT_ALWAYS(aRequest->Operation()->Function()==EFsFileChangeMode,Fault(EBaseRequestMessage));
384 CFileShare* share = (CFileShare*)aRequest->ScratchValue();
386 return(KErrBadHandle);
388 NameFromShare(share, aName);
389 aCurrentMode = share->iMode & KFileShareMask;
390 aModified = share->File().Modified();
392 aNewMode = aRequest->Message().Int0();
398 Utility function for obtaining info on file Rename requests.
400 @param aRequest File Rename request
401 @param aCurrentName File's current name
402 @param aCurrentDrive File's current drive
403 @param aNewName the new name
404 @return KErrNone on successful read of info from CFsRequest or a system wide error
406 LOCAL_C TInt FileRenameVars(CFsRequest* aRequest, TDes& aCurrentName, TDriveUnit& aCurrentDrive, TDes& aNewName)
408 __ASSERT_ALWAYS(aRequest->Operation()->Function()==EFsFileRename,Fault(EBaseRequestMessage));
410 CFileShare* share = (CFileShare*)aRequest->ScratchValue();
412 return(KErrBadHandle);
414 NameFromShare(share, aCurrentName);
415 aCurrentDrive = share->File().Mount().Drive().DriveNumber();
417 aNewName = aRequest->Dest().FullName();
423 Utility function for obtaining info on file Drive/Name requests.
425 @param aRequest File Rename request
426 @param aFileName File's current name
427 @param aCurrentDrive File's current drive
428 @param aDriveInfo File's drive information
430 LOCAL_C TInt FileDriveNameVars(CFsRequest* aRequest, TDes& aFileName, TDriveUnit& aCurrentDrive,TDriveInfo& aDriveInfo)
432 __ASSERT_ALWAYS(aRequest->Operation()->Function()==EFsFileDrive || aRequest->Operation()->Function()==EFsFileName,Fault(EBaseRequestMessage));
434 CFileShare* share = (CFileShare*)aRequest->ScratchValue();
436 return(KErrBadHandle);
438 NameFromShare(share, aFileName);
439 aCurrentDrive = share->File().Mount().Drive().DriveNumber();
440 share->File().Mount().Drive().DriveInfo(aDriveInfo);
446 Utility function for obtaining info on file delete requests.
448 @param aRequest Dir read request
449 @param aFileName The name of the file
451 LOCAL_C TInt FileDelVars(CFsRequest* aRequest, TDes& aFileName)
453 __ASSERT_ALWAYS(aRequest->Operation()->Function()==EFsDelete,Fault(EBaseRequestMessage));
455 aFileName = aRequest->Src().FullName();
461 Utility function for obtaining info on file rename/replace requests.
463 @param aRequest File rename/replace request
464 @param aOldFileName The old name of the file
465 @param aNewFileName The new name of the file
467 LOCAL_C TInt FileRenameReplaceVars(CFsRequest* aRequest, TDes& aOldFileName,TDes& aNewFileName)
469 __ASSERT_ALWAYS(aRequest->Operation()->Function()==EFsRename || aRequest->Operation()->Function()==EFsReplace,Fault(EBaseRequestMessage));
471 aOldFileName = aRequest->Src().FullName();
472 aNewFileName = aRequest->Dest().FullName();
478 Utility function for obtaining info on file close requests.
480 @param aRequest File close request
481 @param aPath The path of the file
484 LOCAL_C TInt FileCloseVars(CFsRequest* aRequest, TDes& aFileName)
486 __ASSERT_ALWAYS(aRequest->Operation()->Function()==EFsFileSubClose,Fault(EBaseRequestMessage));
488 const TDes* fileName=(TDes*) I64HIGH(aRequest->ScratchValue64());
492 aFileName = _L("?:");
493 aFileName[0] = TText('A' + aRequest->DriveNumber());
494 aFileName.Append(*fileName);
504 Utility function for obtaining info on dir Open requests.
506 @param aRequest Dir Open request
507 @param aDirName Name of Dir
508 @param aAtt Attribute
509 @param aUidType Uid Type
511 LOCAL_C TInt DirOpenVars(CFsRequest* aRequest, TDes& aDirName, TInt& aAtt,TInt& aUidType)
513 __ASSERT_ALWAYS(aRequest->Operation()->Function()==EFsDirOpen,Fault(EBaseRequestMessage));
515 aDirName = aRequest->Src().FullName();
517 aAtt = aRequest->Message().Int1();
518 aUidType = aRequest->Message().Int2();
525 Utility function for obtaining info on dir Make requests.
527 @param aRequest MkDir/MkDirAll request
528 @param aMkDirAll if MkDirAll it will be 1
529 @param aPath The path name specifiying the directory or directories to create.
531 LOCAL_C TInt DirMakeVars(CFsRequest* aRequest, TInt& aMkDirAll, TDes& aPath)
533 __ASSERT_ALWAYS(aRequest->Operation()->Function()==EFsMkDir,Fault(EBaseRequestMessage));
535 aMkDirAll = aRequest->Message().Int1();
536 aPath = aRequest->Src().FullName();
542 Utility function for obtaining info on dir remove requests.
544 @param aRequest RmDir request
545 @param aPath The path name specifiying the directory to be removed.
547 LOCAL_C TInt DirRemoveVars(CFsRequest* aRequest, TDes& aPath)
549 __ASSERT_ALWAYS(aRequest->Operation()->Function()==EFsRmDir,Fault(EBaseRequestMessage));
551 aPath = aRequest->Src().FullName();
557 Utility function for obtaining info on file entry requests.
559 @param aRequest File entry request
560 @param aName Entry name
562 LOCAL_C TInt FileEntryVars(CFsRequest* aRequest, TDes& aName)
564 __ASSERT_ALWAYS(aRequest->Operation()->Function()==EFsEntry ||
565 aRequest->Operation()->Function()==EFsSetEntry,
566 Fault(EBaseRequestMessage));
568 aName = aRequest->Src().FullName();
574 Utility function for obtaining info on file read file section requests.
576 @param aRequest Read file section request
577 @param aLen The length of file for access
578 @param aPos Position of first byte to be accessed
579 @param aName File name
580 @return KErrNone successful (aLen aPos and aName updated)
582 LOCAL_C TInt FileSectionVars(CFsRequest* aRequest, TInt& aLen, TInt& aPos, TDes& aName)
584 __ASSERT_ALWAYS(aRequest->Operation()->Function()==EFsReadFileSection,Fault(EBaseRequestMessage));
586 aPos = aRequest->Message().Int2();
587 aLen = aRequest->Message().Int3();
589 aName = aRequest->Src().FullName();
597 Utility function for obtaining the name of the file/dir from the client request
598 Supported requests are:
632 @param aRequest The client request
633 @param aName Name of the file/folder
634 @return KErrNone on successful completion, KErrNotSupported if the request is not supported
636 EXPORT_C TInt GetName(TFsPluginRequest* aRequest, TDes& aName)
655 switch(aRequest->Function())
657 case EFsFileDuplicate:
659 err = FileDuplicateAdoptVars(aRequest->Request(), driveNumber, handle, att, size, aName, modified);
662 err = FileOpenVar(aRequest->Request(), mode, handle, aName);
666 err = FileCreateReplaceVar(aRequest->Request(), mode, aName);
669 err = FileTempVar(aRequest->Request(), mode, aName, path);
673 err = FileAccessVars(aRequest->Request(), len, pos, aName, ptr);
677 err = FileLockVars(aRequest->Request(), len, pos, aName);
680 err = FileSeekVars(aRequest->Request(), pos, aName, ptr);
683 err = FileFlushVars(aRequest->Request(), aName);
687 err = FileSizeVars(aRequest->Request(),size, aName);
690 err = FileAttVars(aRequest->Request(),att, aName);
693 err = FileSetAttVars(aRequest->Request(),att, aName, attMask, attMask);
695 case EFsFileModified:
696 case EFsFileSetModified:
697 err = FileModificationVars(aRequest->Request(),att, size, aName, modified, modified);
700 err = FileSetVars(aRequest->Request(), aName, att,att, att, modified, modified);
702 case EFsFileChangeMode:
703 err = FileChangeModeVars(aRequest->Request(), aName, fmode,fmode, modified);
706 err = FileRenameVars(aRequest->Request(), aName, drive, (TDes&)newName);
710 err = FileDriveNameVars(aRequest->Request(), aName, drive, info);
713 err = FileDelVars(aRequest->Request(), aName);
717 err = FileRenameReplaceVars(aRequest->Request(), aName, (TDes&)newName);
720 err = DirOpenVars(aRequest->Request(), aName, att,uidType);
722 case EFsFileSubClose:
723 err = FileCloseVars(aRequest->Request(), aName);
727 err = FileEntryVars(aRequest->Request(), aName);
729 case EFsReadFileSection:
730 err = FileSectionVars(aRequest->Request(), len, pos, (TDes&)aName);
733 err = KErrNotSupported;
742 Utility function for obtaining the proposed new name of the file/dir from the client rename/replace request
743 Supported requests are:
749 @param aRequest The client request
750 @param aName New name of the file/folder
751 @return KErrNone on successful completion, KErrNotSupported if the request is not supported
753 EXPORT_C TInt GetNewName(TFsPluginRequest* aRequest, TDes& aNewName)
759 switch(aRequest->Function())
762 err = FileRenameVars(aRequest->Request(), (TDes&)name, drive, aNewName);
766 err = FileRenameReplaceVars(aRequest->Request(), name, aNewName);
769 err = KErrNotSupported;
779 Utility function for obtaining the path from the client request
780 Supported requests currently are:
786 @param aRequest The client request
787 @param aPath The path
788 @return KErrNone on successful completion, KErrNotSupported if the request is not supported
790 EXPORT_C TInt GetPath(TFsPluginRequest* aRequest, TDes& aPath)
797 switch(aRequest->Function())
800 err = FileTempVar(aRequest->Request(), mode, (TDes&)name, aPath);
803 err = DirMakeVars(aRequest->Request(), fmode, aPath);
806 err = DirRemoveVars(aRequest->Request(), aPath);
809 err = KErrNotSupported;
818 Utility function for obtaining the attribute of the file/folder from the client request
819 Supported requests currently are:
830 @param aRequest The client request
831 @param aAtt The attribute
832 @return KErrNone on successful completion, KErrNotSupported if the request is not supported
834 EXPORT_C TInt GetAtt(TFsPluginRequest* aRequest, TInt& aAtt)
846 switch(aRequest->Function())
848 case EFsFileDuplicate:
850 err = FileDuplicateAdoptVars(aRequest->Request(), driveNumber, handle, aAtt, size,(TDes&)name, modified);
853 err = FileAttVars(aRequest->Request(),aAtt, (TDes&)name);
856 err = FileSetAttVars(aRequest->Request(),aAtt, (TDes&)name, attMask, attMask);
858 case EFsFileModified:
859 case EFsFileSetModified:
860 err = FileModificationVars(aRequest->Request(),aAtt, size,(TDes&)name, modified, modified);
863 err = FileSetVars(aRequest->Request(), (TDes&)name, aAtt, att, att, modified, modified);
866 err = DirOpenVars(aRequest->Request(), (TDes&)name, aAtt, uidType);
869 err = KErrNotSupported;
879 Utility function for obtaining the last modified time of a file from the client request
880 Supported requests currently are:
889 @param aRequest The client request
890 @param aModified The last modified time
891 @param aCurrent If true it returns the current last modified time, otherwise it will return
892 the requested last modified time
893 @return KErrNone on successful completion, KErrNotSupported if the request is not supported
895 EXPORT_C TInt GetModifiedTime(TFsPluginRequest* aRequest, TTime*& aModified, TBool aCurrent)
905 TTime& _aModified = aModified ? *aModified : modified;
909 switch(aRequest->Function())
911 case EFsFileDuplicate:
913 err = FileDuplicateAdoptVars(aRequest->Request(), driveNumber, handle, att, size, (TDes&)name, _aModified);
915 case EFsFileModified:
916 err = FileModificationVars(aRequest->Request(), att, size, (TDes&)name, _aModified, modified);
918 case EFsFileSetModified:
920 err = FileModificationVars(aRequest->Request(), att, size, (TDes&)name, _aModified, modified);
922 err = FileModificationVars(aRequest->Request(), att, size, (TDes&)name, modified, _aModified);
926 err = FileSetVars(aRequest->Request(), (TDes&)name, att, att, att, _aModified, modified);
928 err = FileSetVars(aRequest->Request(), (TDes&)name, att, att, att, modified, _aModified);
930 case EFsFileChangeMode:
931 err = FileChangeModeVars(aRequest->Request(), (TDes&)name, fmode, fmode, _aModified);
934 err = KErrNotSupported;
943 Utility function for obtaining the file access information from the client request
944 Supported requests currently are:
953 @param aRequest The client request
954 @param aLength Length of access
955 @param aPos Position of access
956 @return KErrNone on successful completion, KErrNotSupported if the request is not supported
958 EXPORT_C TInt GetFileAccessInfo(TFsPluginRequest* aRequest, TInt& aLength, TInt& aPos)
964 switch(aRequest->Function())
969 err = FileAccessVars(aRequest->Request(), aLength, aPos, (TDes&)name, ptr);
973 err = FileLockVars(aRequest->Request(), aLength, aPos, (TDes&)name);
976 err = FileSeekVars(aRequest->Request(), aPos, (TDes&)name, ptr);
979 case EFsReadFileSection:
980 err = FileSectionVars(aRequest->Request(), aLength, aPos, (TDes&)name);
983 err = KErrNotSupported;