filestorage ExtractTo structure
Sub properties
Return to Introduction  Previous page  Next page
Applies to
acFileStorage component, as subproperty of AutoExtract structure.  

Declaration
type  
  TExtractTo = class(TPersistent)  
  published  
    property CreatePath: Boolean;  
    property ToplevelDirTacSystemDirectory;  
    property SubdirectoryString;  
  end;  
 
property ExtractTo: TExtractTo;  

Examples of usage
1. If you would like to extract stored files to the Desktop — just make TopLevelDir property "sdDesktop". Leave SubDirectory string clean.  
 
2. If you would like to extract files to current directory, create subdirectory named, let's say, "plugins" and exctract files there — set ToplevelDir property as "sdCurrentDir" and assign SubDirectory property as "plugins" (SubDirectory := 'plugins'). If you would like to create this subdirectory automatically even if it's does not exists — set CreatePath property to True.  
 
3. If you would like to extract your files to non-system folder (for example, to "h:\databases\my own database\") then you don't need to use any toplevel directories, just set ToplevelDir property to "sdNone" and assign to SubDirectory "h:\databases\my own database" path. If you would like to create this subdirectory automatically even if it's does not exists — set CreatePath property to True.  

Note
You don't need to change anything from AutoExtract subproperties at run-time because of these auto extracting features used by acFileStorage on program startup only. You may set this property at design-time only, all run-time modifications will senseless.  

See also
GetSysDir and ExpandToRealPath functions.