Results 1 to 2 of 2

Thread: Manipulating and parsing files in the StorageEngine.FileSystem (Database)

  1. #1
    Junior Member
    Join Date
    Apr 2011
    Posts
    28

    Default Manipulating and parsing files in the StorageEngine.FileSystem (Database)

    I want to parse and manipulate all the files stored in the StorageEngine.FileSystem. I can't find my way. Please tell by coding, How can this be done?

    
            Dim srcTable As XTable(Of Long, LibertyPIM_Vault) = Nothing
    
            Try
                'open source table
                srcTable = session.myDB.dbObject.Scheme.OpenXTable(Of Long, LibertyPIM_Vault)(New Locator("LibertyPIM_Vault"))
                If IsNothing(srcTable) Then Return False
    
            Catch ex As Exception
                Return False
            End Try
    
            Dim srcFile As RawFile = session.myDB.dbObject.FileSystem.ObtainFile()
    
    Regards,
    Tushar

  2. #2

    Default

    1. If you want to find and manipulate the back-ended RawFile of some XTable you have to find the relevant scheme record in the egine.Scheme table by the XTable locator:
        SchemeRecord record;
        if (engine.Scheme.TryGet(new Locator("table1"), out record))
        {
            RawFile rawFile = engine.FileSystem.OpenFile(record.Handle);
            ...
        }
    
    2. Every XTable instance also has a public field
    public readonly RawFile RawFile;
    
    which indicates which is their back-ended raw file.

    3. You can also enumerate the handles of all back-ended RawFiles of the available XTables:
        foreach (var row in engine.Scheme)
        {
            Console.WriteLine("RawFile handle:{0}, Locator:{1}, XTable:{2}", row.Record.Handle, row.Key, row.Record.Type);
        }
    
    The Scheme table is the catalog of all tables contained in the database. It is a XTable descendant, so you can do the same operations as with a regular XTable.

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
2002 - 2014 STS Soft SC. All Rights reserved.
STSdb, Waterfall Tree and WTree are registered trademarks of STS Soft SC.