Delphi Database, Delphi Components from ComponentAce
Products Download Order Contact us

StorePathMode type

FlexCompress

Previous  Top  Next

Describes how path infromation will be stored for the file or directory within the archive file.

 

[C#]

public enum StorePathMode

{

  NoPath,

  RelativePath,

  FullPath

}

 

[VB.NET]

Public Enum StorePathMode

  ' Fields

  FullPath = 2

  NoPath = 0

  RelativePath = 1

End Enum

 

Description

 

StorePathMode value defines how path information will be stored for the file or directory within the archive file. If you need to store all files and directories without path you should use NoPath value. For example, AddFiles("C:\TEST\test.txt") adds file test.txt to the archive. If you will extract it by ExtractFiles("*.*") and BaseDir will be "C:\", file test.txt will be extracted to "C\":, not to "C:\TEST".

 

If you need to store path relative to certain directory you should set BaseDir before adding file to archive and set Options.StorePath to Relative. In this case if you will set BaseDir to "C:\" and call AddFiles("C:\TEST\test.txt") the file test.txt will be stored as "TEST\test.txt" within the archive. If you will extract it by ExtractFiles("*.*") it will be extracted to "C:\TEST\test.txt", not to "C:\" as in previous example.

 

If you need to store full path you should set Options.StorePath to FullPath. Previous example will store test.txt within the archive file as "\TEST\test.txt" and file will be extracted to disk specified by BaseDir.

 

If you need to store absolute path with drive you should set Options.StorePath to spFullPathWithDrive. Previous AddFiles example will store test.txt within the archive file as "C:\TEST\test.txt" and the file will be extracted to disk using stored absolute path regardless of BaseDir.

 

Options.StorePath can be set to any of the following values:

Value                    

Meaning                                                                                  

NoPath

No path information stored

RelativePath

Path information stored relatively BaseDir

FullPath

Path information stored relatively disk specified by BaseDir

 

 

        © 2003 - 2024 ComponentAce  | .net zip component | barcode for .net | delphi zip component | delphi database Apr 19, 2024