Class PolarFileInfo_Selection
- Namespace
- PolarStudioGlobals
- Assembly
- PolarStudioGlobals.dll
This class is a selection of one or more files/folders for creating an archive or deleting a selection.
public class PolarFileInfo_Selection
- Inheritance
-
PolarFileInfo_Selection
- Inherited Members
- Extension Methods
Fields
Files
Returns all files/folders in this selection
public Collection<PolarFileInfo> Files
Field Value
PrimaryFiles
Returns the files/folders that were explicitly added.
public Collection<PolarFileInfo> PrimaryFiles
Field Value
Properties
DirectoryCount
Returns the total number of folders.
public int DirectoryCount { get; }
Property Value
FileCount
Returns the total number of files/folders.
public int FileCount { get; }
Property Value
TotalBytes
Returns the total number of bytes in the selection.
public long TotalBytes { get; }
Property Value
Methods
AddFile(PolarFileInfo)
Adds a file/folder to the selection. Folders are added with a maximum depth of 15 folders to prevent recursive loops.
public PolarFileInfo_Selection AddFile(PolarFileInfo pPolarFileInfo)
Parameters
pPolarFileInfo
PolarFileInfoThe file/folder to add
Returns
- PolarFileInfo_Selection
This PolarFileInfo_Selection object.
Delete()
Deletes all files/folders in the selection recursively.
public string Delete()
Returns
- string
An error message if applicable.
GetZipArchive()
Returns a byearray for the zipped contents of the collection.
public byte[] GetZipArchive()
Returns
- byte[]
GetZipArchiveAsString(bool)
Returns the zipped contents as string.
public string GetZipArchiveAsString(bool pBase64encode = false)
Parameters
pBase64encode
boolIf True, the data is returned as base-64 encoded string, else as binary string.