On 2/15/07, Eric Richards <[EMAIL PROTECTED]> wrote:

>
> Think of your VirtualVolume file as a file system, and root is the
> highest directory you can access.
>
> I have an application whose file format is a bunch of different
> folders within the root, each of which may contain anywhere from one
> to several different files. I chose to organize it that way to keep it
> better organized from my perspective. The files could have all been
> stored within the root (i.e. no subfolders), instead, but I chose this
> way of doing it. It's totally up to you.
>
> So the way you get something out of a VirtualVolume file is to get the
> root FolderItem and then dig down from there to wherever you have
> saved your data in the structure you created. Hope that makes sense.
>
Ahh.. ok.

Well I got a VV file made and stuffed with data.. I think.

Now getting it out seems a bit tricky. I want
to get each file (Name) listed in a listbox.

  Dim vv As VirtualVolume
  Dim realFile As FolderItem
  Dim virtFile As FolderItem
  Dim inp As BinaryStream

  realFile = GetFolderItem("").Child("VirVol")
  vv = realFile.OpenAsVirtualVolume

  If vv = Nil then
    MsgBox "Unable to open virtual volume"
  else
    virtFile = vv.Root.child("Data")

    inp = virtFile.openAsBinaryFile()

    //ListBox1.addRow inp.readPString
  end if
exception
  quit


Careful with how much data you plan to store in VVs.  I tried with my
large (100 MB) image files and VV's were 10-100 times slower (and th.f
unusable for me) than a single flat file.  For small data sets it
should work fine.

I have a quick project that runs a comparison if you wan to tryt.

P.



-------------------------------------------------------------------------------
Peter K. Stys, MD
Professor of Medicine(Neurology), Senior Scientist
Ottawa Health Research Institute, Div. of Neuroscience
Ottawa Hospital / University of Ottawa
Ontario, CANADA
tel:    (613)761-5444
fax:    (613)761-5330
http://www.ohri.ca/profiles/stys.asp
-------------------------------------------------------------------------------
_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>

Search the archives:
<http://support.realsoftware.com/listarchives/lists.html>

Reply via email to