Solid File System

Virtual file system enigne that can be embedded into your software.

SolFSStorage.CheckAndRepair method

Filter:

Pascal    Plain C    C++ (DLL/Lib)    C++ (VCL)    C++ (.NET)    C#    VB.NET    Java 

SolFSStorage     See also    

Overview

Checks and repairs storage if necessary

Declaration

[Pascal]
    procedure CheckAndRepair(Flags : LongWord);

[Plain C]
    long _stdcall StorageCheckAndRepair(const wchar_t* FileName, unsigned long PageSize, unsigned long Flags, wchar_t * Password, unsigned long PasswordLen, CallbackDataType ProgressUserData, SolFSProgressFunc ProgressFunc);
    long _stdcall StorageCheckAndRepairCB(const wchar_t* FileName, unsigned long PageSize, unsigned long Flags, wchar_t * Password, unsigned long PasswordLen, CallbackDataType ProgressUserData, SolFSProgressFunc ProgressFunc, CallbackDataType UserData, SolFSCreateFileFunc CreateFileFunc, SolFSOpenFileFunc OpenFileFunc, SolFSCloseFileFunc CloseFileFunc, SolFSFlushFileFunc FlushFileFunc, SolFSDeleteFileFunc DeleteFileFunc, SolFSGetFileSizeFunc GetFileSizeFunc, SolFSSetFileSizeFunc SetFileSizeFunc, SolFSSeekFileFunc SeekFileFunc, SolFSReadFileFunc ReadFileFunc, SolFSWriteFileFunc WriteFileFunc);

[C++ (DLL/Lib)]
    void CheckAndRepair(unsigned long flags)

[C++ (VCL)]
    void __fastcall CheckAndRepair(unsigned long Flag);

[C++ (.NET)]
    void CheckAndRepair( String *fileName, unsigned long pageSize, unsigned long flags, String* password);
    void CheckAndRepair( unsigned long flags);

[C#]
    void CheckAndRepair( String fileName, uint pageSize, uint flags, String password);
    void CheckAndRepair(uint flags);

[VB.NET]
    Sub CheckAndRepair(ByVal fileName As String, ByVal pageSize As System.UInt32, ByVal flags As System.UInt32, ByVal password As String)
    Sub CheckAndRepair(ByVal flags As System.UInt32)

[Java]
    void checkAndRepair(CheckAndRepairFlags flags);

Parameters

  • FileName - the name of storage file
  • PageSize - supposed size of the page in storage file. This parameter is used only when the size can't be determined from storage file.
  • Flags - Check and repair flags. See the list of values below.
  • Password - Password for the storage or empty string if the storage is not encrypted
  • delegates (event handlers) - see corresponding delegate/event type description.
  • [Plain C] Storage - handle to the storage returned by Create or Open function.
  • [Plain C] PasswordLen - Length of the specified password buffer
  • [Plain C] ProgressUserData - application-defined data which is passed to OnProgress callback.
  • [Plain C] ProgressFunc - OnProgress callback which is called during the operation.

Values of Flags

Flags is a combination of zero or more flags:

[Plain C]  Return values

0 if the function succeeded or one of Error codes if the function failed.

Description

Use CheckAndRepair to check and, if necessary, repair the storage file.

It is necessary to use CheckAndRepair when the call to SolFS API returns "Storage Corrupted" error or when IsCorrupted property is true.

See also

IsCorrupted     OnProgress    

Back to top