Kerbal Space Program  1.12.4
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Events Macros
Static Public Member Functions | List of all members
KSPCompression Class Reference
Inheritance diagram for KSPCompression:

Static Public Member Functions

static bool CompressDirectory (string sourcePath, string destPath, bool includeTopLevelFolder, bool overwrite=true)
 Compress a directory into one zip file More...
 
static void DecompressFile (string filePath, string extractPath)
 Extracts a zip file into a specified location. More...
 
static bool FilesAtRoot (string filePath)
 Check if theres any files at the root of the zip More...
 
static List< string > GetTopLevelDirectories (string filePath)
 Get all the Top Level Directories from the zip file More...
 

Member Function Documentation

static bool KSPCompression.CompressDirectory ( string  sourcePath,
string  destPath,
bool  includeTopLevelFolder,
bool  overwrite = true 
)
inlinestatic

Compress a directory into one zip file

Parameters
sourcePathDirectory to be compressed
destPathzip File to write
includeTopLevelFolderShould we make a folder in the ZIP with the same name as the folder we are compressing
overwriteOverwrite the zip if it exists already.
static void KSPCompression.DecompressFile ( string  filePath,
string  extractPath 
)
inlinestatic

Extracts a zip file into a specified location.

Parameters
filePathFile to be decompressed
exportPathDirectory into which to decompress the file
static bool KSPCompression.FilesAtRoot ( string  filePath)
inlinestatic

Check if theres any files at the root of the zip

Parameters
filePathPath of zip that we are getting names from
Returns
static List<string> KSPCompression.GetTopLevelDirectories ( string  filePath)
inlinestatic

Get all the Top Level Directories from the zip file

Parameters
filePathPath of zip that we are getting names from
Returns

The documentation for this class was generated from the following file: