Solid File System

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

SolFSStorage constructor (opens the storage)

Filter:

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

SolFSStorage     See also    

Overview

Creates storage object and opens the storage.

Declaration

[Pascal]
    constructor Create( FileName: TSolFSString; PageSize: LongWord=512; CreateNew: Boolean = false; Logo: TSolFSString=''; PathSeparator: WideChar='/'; UseTransactions: Boolean = false; UseAccessTime: Boolean = false; OpenReadOnly : boolean = false; PartSize: LongWord = 0 );

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

[Plain C]
    long _stdcall StorageCreate( const wchar_t* FileName, char Overwrite, unsigned long PageSize, wchar_t* Logo, unsigned long* Storage, wchar_t PathSeparator, char UseTransactions, char UseAccessTime );
    long _stdcall StorageCreateParted( const wchar_t* FileName, char Overwrite, unsigned long PartSize, unsigned long PageSize, wchar_t* Logo, unsigned long* Storage, wchar_t PathSeparator, char UseTransactions, char UseAccessTime );

[C++ (DLL/Lib)]
    SolFSStorage(unsigned short *fileName, bool useTransactions, bool useLastAccessTime, wchar_t pathSeparator)
    SolFSStorage(unsigned short *fileName, bool useTransactions, bool useLastAccessTime, wchar_t pathSeparator, bool openReadOnly)
    SolFSStorage(unsigned short *fileName, bool overwrite, unsigned long partSize, int pageSize, bool useTransactions, bool useLastAccessTime, wchar_t pathSeparator, unsigned short * logo)

[C++ (VCL)]
    TStorage(TSolFSString FileName, unsigned PageSize, bool CreateNew, TSolFSString Logo, bool UseTransactions=true, bool UseAccessTime=false, WideChar PathSeparator='/', bool OpenReadOnly = false, PartSize = 0);

[C++ (.NET)]
    SolFSStorage(String* fileName, bool useTransactions, bool useLastAccessTime, wchar_t pathSeparator)
    SolFSStorage(String* fileName, bool useTransactions, bool useLastAccessTime, wchar_t pathSeparator, bool openReadOnly)
    SolFSStorage(String* fileName, bool overwrite, long partSize, int pageSize, bool useTransactions, bool useLastAccessTime, wchar_t pathSeparator, String* logo)

[C#]
    SolFSStorage(string fileName, bool useTransactions, bool useLastAccessTime, char pathSeparator)
    SolFSStorage(string fileName, bool useTransactions, bool useLastAccessTime, char pathSeparator, bool openReadOnly)
    SolFSStorage(string fileName, bool overwrite, int partSize, int pageSize, bool useTransactions, bool useLastAccessTime, char pathSeparator, string logo)

[VB.NET]
    SolFSStorage(fileName As String, useTransactions As Boolean, useLastAccessTime As Boolean, pathSeparator As Char)
    SolFSStorage(fileName As String, useTransactions As Boolean, useLastAccessTime As Boolean, pathSeparator As Char, bool openReadOnly As Boolean)
    SolFSStorage(fileName As String, overwrite As Boolean, partSize As Integer, pageSize As Integer, useTransactions As Boolean, useLastAccessTime As Boolean, pathSeparator As Char, logo As String)

[Java]
    SolFSStorage(String fileName, boolean useTransactions, boolean useLastAccessTime, char pathSeparator)
    SolFSStorage(String fileName, boolean useTransactions, boolean useLastAccessTime, char pathSeparator, boolean openReadOnly)
    SolFSStorage(String fileName, boolean overwrite, int partSize, int pageSize, boolean useTransactions, boolean useLastAccessTime, char pathSeparator, String logo)

Parameters

  • FileName - specifies the name of the storage file on physical media.
  • PartSize - specifies part size in bytes or 0 if no parted storage is created. If set, the value must be a multiple of the PageSize
  • PageSize - specifies default page size in bytes (when creating new storage).
  • CreateNew - set this parameter to True if new storage must be created and False if existing 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).
  • [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 storage object and create or open a storage on physical disk. If the delegates (event handlers) are not specified, the storage is opened/created on physical media. If the constructor that expects delegates/event handlers is used and some of delegates/event handlers are not specified, constructor will fail.

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

If the storage (container file) has ReadOnly attribute on the disk, you should open it in read-only mode. Attempts to open such storage in Read-Write mode will fail.

Read more about parted storages.

See also

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

Back to top