2629 return r; |
2629 return r; |
2630 } |
2630 } |
2631 |
2631 |
2632 |
2632 |
2633 |
2633 |
2634 |
|
2635 EFSRV_EXPORT_C TInt RFs::CheckDisk(const TDesC& aDrive) const |
|
2636 /** |
2634 /** |
2637 Checks the integrity of the disk on the specified drive. |
2635 Checks the integrity of the disk on the specified drive. |
2638 On FAT, this checks if a cluster number is invalid, if a cluster is allocated to |
2636 On FAT, this checks if a cluster number is invalid, if a cluster is allocated to |
2639 more than one file entry, if an unallocated cluster is not set free, and if size |
2637 more than one file entry, if an unallocated cluster is not set free, and if size |
2640 of an entry is invalid. |
2638 of an entry is invalid. |
2650 3, if successful but an unallocated cluster contains a value; |
2648 3, if successful but an unallocated cluster contains a value; |
2651 4, if successful but the size of a file is not equal to the number of clusters in chain; |
2649 4, if successful but the size of a file is not equal to the number of clusters in chain; |
2652 KErrNotReady, if the specified drive is empty; |
2650 KErrNotReady, if the specified drive is empty; |
2653 KErrNotSupported, if the drive cannot handle this request; |
2651 KErrNotSupported, if the drive cannot handle this request; |
2654 KErrPermissionDenied, if the caller doesn't have DiskAdmin capability; |
2652 KErrPermissionDenied, if the caller doesn't have DiskAdmin capability; |
2655 KErrTooBig, if the drives folder depth exceeds maximum allowed. For the current FAT file system implementation this limit is 50. |
|
2656 Other system wide error codes may also be returned. |
2653 Other system wide error codes may also be returned. |
2657 |
2654 |
2658 @capability DiskAdmin |
2655 @capability DiskAdmin |
2659 */ |
2656 */ |
|
2657 EFSRV_EXPORT_C TInt RFs::CheckDisk(const TDesC& aDrive) const |
2660 { |
2658 { |
2661 TRACEMULT2(UTF::EBorder, UTraceModuleEfsrv::EFsCheckDisk, MODULEUID, Handle(), aDrive); |
2659 TRACEMULT2(UTF::EBorder, UTraceModuleEfsrv::EFsCheckDisk, MODULEUID, Handle(), aDrive); |
2662 TInt r = SendReceive(EFsCheckDisk,TIpcArgs(&aDrive)); |
2660 TInt r = SendReceive(EFsCheckDisk,TIpcArgs(&aDrive)); |
2663 |
2661 |
2664 TRACERET1(UTF::EBorder, UTraceModuleEfsrv::EFsCheckDiskReturn, MODULEUID, r); |
2662 TRACERET1(UTF::EBorder, UTraceModuleEfsrv::EFsCheckDiskReturn, MODULEUID, r); |