SolFSStorage constructor (opens the storage in callback mode)

Filter:

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

SolFSStorage     See also    

Overview

Creates storage object and opens storage in callback mode.

Declaration

[Pascal]
    constructor CreateCB( FileName: TSolFSString; PageSize: LongWord=512; CreateNew: Boolean=False; Logo: TSolFSString=''; PathSeparator: WideChar='/'; UseTransactions: Boolean=False; UseAccessTime: Boolean=False; OpenReadOnly : boolean = false; OnFileCreate : TSolFSFileCreateEvent = nil; OnFileOpen : TSolFSFileOpenEvent = nil; OnFileClose : TSolFSFileCloseEvent = nil; OnFileFlush : TSolFSFileFlushEvent = nil; OnFileGetSize : TSolFSFileGetSizeEvent = nil; OnFileSetSize : TSolFSFileSetSizeEvent = nil; OnFileRead : TSolFSFileReadEvent = nil; OnFileWrite : TSolFSFileWriteEvent = nil; OnFileDelete : TSolFSFileDeleteEvent = nil);

    type TSolFSString = {$ifdef UNICODE}UnicodeString{$else}WideString{$endif};

[Plain C]
    long _stdcall StorageCreateCB( const wchar_t* FileName, char Overwrite, unsigned long PageSize, wchar_t* Logo, unsigned long* Storage, wchar_t PathSeparator, char UseTransactions, char UseAccessTime, bool ReadOnly, CallbackDataType UserData, SolFSFileCreateFunc FileCreateFunc, SolFSFileOpenFunc FileOpenFunc, SolFSFileCloseFunc FileCloseFunc, SolFSFileFlushFunc FileFlushFunc, SolFSFileGetSizeFunc FileGetSizeFunc, SolFSFileSetSizeFunc FileSetSizeFunc, SolFSFileReadWriteFunc FileReadFunc, SolFSFileReadWriteFunc FileWriteFunc, SolFSFileDeleteFunc FileDeleteFunc);

[C++ (DLL/Lib)]
    SolFSStorage(unsigned short * fileName, bool useTransactions, bool useLastAccessTime, wchar_t pathSeparator, bool ReadOnly, CallbackDataType UserData, SolFSFileCreateFunc* OnFileCreate, SolFSFileOpenFunc* OnFileOpen, SolFSFileCloseFunc* OnFileClose, SolFSFileFlushFunc* OnFileFlush, SolFSFileGetSizeFunc* OnFileGetSize, SolFSFileSetSizeFunc* OnFileSetSize, SolFSFileReadWriteFunc* OnFileRead, SolFSFileReadWriteFunc* OnFileWrite, SolFSFileDeleteFunc* OnFileDelete);
    SolFSStorage(unsigned short * fileName, bool overwrite, int pageSize, bool useTransactions, bool useLastAccessTime, wchar_t pathSeparator, unsigned short * logo, CallbackDataType UserData, SolFSFileCreateFunc* OnFileCreate, SolFSFileOpenFunc* OnFileOpen, SolFSFileCloseFunc* OnFileClose, SolFSFileFlushFunc* OnFileFlush, SolFSFileGetSizeFunc* OnFileGetSize, SolFSFileSetSizeFunc* OnFileSetSize, SolFSFileReadWriteFunc* OnFileRead, SolFSFileReadWriteFunc* OnFileWrite, SolFSFileDeleteFunc* OnFileDelete);

[C++ (VCL)]
    TSolFSStorage(TSolFSString FileName, unsigned PageSize, bool CreateNew, bool ReadOnly, TSolFSString Logo, bool UseTransactions=true, bool UseAccessTime=false, WideChar PathSeparator='/', bool OpenReadOnly = false, TSolFSFileCreateEvent OnFileCreate = NULL, TSolFSFileOpenEvent OnFileOpen = NULL, TSolFSFileCloseEvent OnFileClose = NULL, TSolFSFileFlushEvent OnFileFlush = NULL, TSolFSFileGetSizeEvent OnFileGetSize = NULL, TSolFSFileSetSizeEvent OnFileSetSize = NULL, TSolFSFileReadEventTSolFSFileReadEvent OnFileRead = NULL, TSolFSFileWriteEvent OnFileWrite = NULL, TSolFSFileDeleteEvent OnFileDelete = NULL);

[C++ (.NET)]
    SolFSStorage(String* fileName, bool useTransactions, bool useLastAccessTime, wchar_t pathSeparator, bool ReadOnly, SolFSFileCreateEvent* OnFileCreate, SolFSFileOpenEvent* OnFileOpen, SolFSFileCloseEvent* OnFileClose, SolFSFileFlushEvent* OnFileFlush, SolFSFileGetSizeEvent* OnFileGetSize, SolFSFileSetSizeEvent* OnFileSetSize, SolFSFileReadEvent*SolFSFileReadEvent* OnFileRead, SolFSFileWriteEvent* OnFileWrite, SolFSFileDeleteEvent* OnFileDelete);
    SolFSStorage(String* fileName, bool overwrite, int pageSize, bool useTransactions, bool useLastAccessTime, wchar_t pathSeparator, String* logo, SolFSFileCreateEvent* OnFileCreate, SolFSFileOpenEvent* OnFileOpen, SolFSFileCloseEvent* OnFileClose, SolFSFileFlushEvent* OnFileFlush, SolFSFileGetSizeEvent* OnFileGetSize, SolFSFileSetSizeEvent* OnFileSetSize, SolFSFileSeekEvent* OnFileSeek, SolFSFileReadEvent*SolFSFileReadEvent* OnFileRead, SolFSFileWriteEvent* OnFileWrite, SolFSFileDeleteEvent* OnFileDelete);

[C#]
    SolFSStorage(string fileName, bool useTransactions, bool useLastAccessTime, char pathSeparator, bool ReadOnly, SolFSFileCreateEvent OnFileCreate, SolFSFileOpenEvent OnFileOpen, SolFSFileCloseEvent OnFileClose, SolFSFileFlushEvent OnFileFlush, SolFSFileGetSizeEvent OnFileGetSize, SolFSFileSetSizeEvent OnFileSetSize, SolFSFileReadEventSolFSFileReadEvent OnFileRead, SolFSFileWriteEvent OnFileWrite, SolFSFileDeleteEvent OnFileDelete);
    SolFSStorage(string fileName, bool overwrite, int pageSize, bool useTransactions, bool useLastAccessTime, char pathSeparator, string logo SolFSFileCreateEvent OnFileCreate, SolFSFileOpenEvent OnFileOpen, SolFSFileCloseEvent OnFileClose, SolFSFileFlushEvent OnFileFlush, SolFSFileGetSizeEvent OnFileGetSize, SolFSFileSetSizeEvent OnFileSetSize, SolFSFileSeekEvent OnFileSeek, SolFSFileReadEventSolFSFileReadEvent OnFileRead, SolFSFileWriteEvent OnFileWrite, SolFSFileDeleteEvent OnFileDelete);

[VB.NET]
    SolFSStorage(fileName As String, useTransactions As Boolean, useLastAccessTime As Boolean, pathSeparator As Char, ReadOnly as Boolean, OnFileCreate As SolFSFileCreateEvent, OnFileOpen As SolFSFileOpenEvent, OnFileClose As SolFSFileCloseEvent, OnFileFlush As SolFSFileFlushEvent, OnFileGetSize As SolFSFileGetSizeEvent, OnFileSetSize As SolFSFileSetSizeEvent, OnFileRead As SolFSFileReadEvent, OnFileWrite As SolFSFileWriteEvent, OnFileDelete As SolFSFileDeleteEvent)
    SolFSStorage(fileName As String, overwrite As Boolean, pageSize As Integer, useTransactions As Boolean, useLastAccessTime As Boolean, pathSeparator As Char, logo As String, OnFileCreate As SolFSFileCreateEvent, OnFileOpen As SolFSFileOpenEvent, OnFileClose As SolFSFileCloseEvent, OnFileFlush As SolFSFileFlushEvent, OnFileGetSize As SolFSFileGetSizeEvent, OnFileSetSize As SolFSFileSetSizeEvent, OnFileRead As SolFSFileReadEvent, OnFileWrite As SolFSFileWriteEvent, OnFileDelete As SolFSFileDeleteEvent)

[Java]
    void createCB(String fileName, boolean Overwrite, long pageSize, String logo)

Parameters

  • FileName - specifies the name of the storage file on physical media.
  • PageSize - specifies default page size (when creating new storage).
  • CreateNew - set this parameter as True if new storage must be created and as False if existent one will be used.
  • Logo -
  • PathSeparator - specifies the separator which will be used in further storage operations.
  • UseTransactions - set this parameter to True to enable transactions and journalling. Note, that transactions slow down file write operations significantly.
  • UseAccessTime - defines whether last access time is written to storage when the file/folder is accessed. Writing access time slows down the operations.
  • Overwrite - specifies whether the Storage parameter must be overwrited if it is already exists.
  • OpenReadOnly - specifies if the storage must be opened-in readonly mode. This is applicable only to storages that already exist (ie. not created with this call).
  • delegates (event handlers) - see corresponding delegate/event type description.
  • [Plain C] Storage - returns handle to the created SolFSStorage.
  • [Plain C] UserData - application-defined parameter which is passed back to callback function.

[Plain C]  Return values

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

Description

Use this constructor to create or open a storage in callback mode.
Callback mode lets you keep a storage on any media and not only on physical disk.
If some of delegates/event handlers are not specified, constructor will fail.

[DLL] Note: this method creates new storage. To open a storage use Open and OpenCB functions.

Read more about callback mode.

See also

PathSeparator     UseAccessTime     UseTransactions     Constructor     Constructor (opens the storage)     [DLL]Open     [DLL]OpenCB