Example #1
0
void CheckDisk()
	{
	TInt r=TheFs.CheckDisk(gSessionPath);
	if (r!=KErrNone && r!=KErrNotSupported)
		ReportCheckDiskFailure(r);
	r = TheFs.ScanDrive(gSessionPath);
	if (r!=KErrNone && r!=KErrNotSupported && r!=KErrInUse)
		ReportCheckDiskFailure(r);
	}
Example #2
0
void DisplayVolumeInfo()
    {
    TVolumeInfo volInfo;
    TInt err = fsSession.Volume(volInfo);
    test(err == KErrNone);

    if (volInfo.iSize-volInfo.iFree != 0)
        {
        test.Printf(_L("Memory 'in use' after a full format = %ld\n"),(volInfo.iSize-volInfo.iFree));
        test.Printf(_L("volInfo.iSize = %ld\n"),volInfo.iSize);
        test.Printf(_L("volInfo.iFree = %ld\n"),volInfo.iFree);
        }

    test.Next(_L("CheckDisk"));
    err = fsSession.CheckDisk(msDrive->GetSessionPath());
    test(err == KErrNone);

    test.Next(_L("ScanDrive"));
    err = fsSession.ScanDrive(msDrive->GetSessionPath());
    test(err == KErrNone);
    }