equal
deleted
inserted
replaced
596 { |
596 { |
597 TPckgBuf<TInt> pkgBuf(ObjectCount); |
597 TPckgBuf<TInt> pkgBuf(ObjectCount); |
598 TInt r=aRequest->Write(2,pkgBuf); |
598 TInt r=aRequest->Write(2,pkgBuf); |
599 return r; |
599 return r; |
600 } |
600 } |
|
601 // Check if the file is in 'file sequential/non-rugged file' mode |
|
602 case KControlIoIsFileSequential: |
|
603 { |
|
604 TDrive* drive = aRequest->Drive(); |
|
605 if(!drive) |
|
606 return KErrNotSupported; |
|
607 |
|
608 // RFs::ControlIO uses narrow descriptors, so convert narrow back to wide |
|
609 TBuf8<KMaxPath> fileNameNarrow; |
|
610 TInt r = aRequest->Read(2, fileNameNarrow); |
|
611 if (r != KErrNone) |
|
612 return r; |
|
613 TFileName fileNameWide; |
|
614 fileNameWide.Copy(fileNameNarrow); |
|
615 |
|
616 // Locate the file |
|
617 CFileCB* file = drive->LocateFile(fileNameWide); |
|
618 if(!file) |
|
619 return KErrNotFound; |
|
620 |
|
621 // isFileSequential = 1 or 0 for EFileSequential mode enabled or disabled respectively |
|
622 TUint8 isFileSequential = (file->IsSequentialMode() != 0); |
|
623 TPtr8 pkgBuf(&isFileSequential,1,1); |
|
624 aRequest->Write(3, pkgBuf); |
|
625 |
|
626 return KErrNone; |
|
627 } |
601 |
628 |
602 } |
629 } |
603 #endif |
630 #endif |
604 |
631 |
605 return(aRequest->Drive()->ControlIO(aRequest->Message(),command,param1,param2)); |
632 return(aRequest->Drive()->ControlIO(aRequest->Message(),command,param1,param2)); |