Einzelnen Beitrag anzeigen

Satty67

Registriert seit: 24. Feb 2007
Ort: Baden
1.566 Beiträge
 
Delphi 2007 Professional
 
#7

AW: Single File Storage - Erfahrungen ?

  Alt 21. Sep 2010, 22:49
keine FileStorages.
Ist ein SingleFile-Storage... der Bindestrich ist da schon wichtig

Es ging ja darum mehrere Dateien in einer einzelnen Datei zu speichern, ohne zu spezifizieren, wie das interne Speichersystem aufgebaut sein muss. Ist doch völlig egal, ob das ein Clustersystem oder Binärstream ist. Wichtig ist nur, das es eine Möglichkeit gibt, aus der Anwendung heraus die Dateien aus dem Storage zu lesen und zu verwenden. Gibt ja VHD-Viewer, die unabhängig von der Umgebung Inhalt anzeigen und extrahieren können.

War ja auch nur ein Vorschlag...

Code:
long diskSize = 30 * 1024 * 1024; //30MB
using (Stream vhdStream = File.Create(@"C:\TEMP\mydisk.vhd"))
{
  Disk disk = Disk.InitializeDynamic(vhdStream, diskSize);
  BiosPartitionTable.Initialize(disk, WellKnownPartitionType.WindowsFat);
  using (FatFileSystem fs = FatFileSystem.FormatPartition(disk, 0, null))
  {
    fs.CreateDirectory(@"TestDir\CHILD");
    // do other things with the file system...
  }
}
Sein erster Link (Zitat aus den Spezifikationen):
Zitat:
GpStructuredStorage compound file is organized in 1 KB blocks. First block contains header, then the content alternates between a file allocation table (FAT) fragment block and 256 blocks managed by the preceeding FAT fragment. Each block can be represented by a number - header block is block #0, first fat fragment is block #1 and so on.
Ich geh' jetzt ins Bett...

Geändert von Satty67 (21. Sep 2010 um 23:14 Uhr)
  Mit Zitat antworten Zitat