C# Class BlogEngine.Core.FileSystem.FileSystemUtilities

Utility class for various FileSystem operations.
Datei anzeigen Open project: rasmuskl/ReSharperCourse

Public Methods

Method Description
CompressDirectory ( string ArchiveOutputLocation, Directory ArchiveDirectory ) : void

Compresses a directory using Zip compression into a specified directory

is recursive

CreateProvider ( string ProviderName ) : Providers.BlogProvider
DumpProvider ( string NewProviderName, string ArchiveOutputLocation ) : string

Dumps the file store provider to a zip file, clears the old file store, switches and reloads a new providers clears the new file storage provider, then loads the new file store provider from the zip.

Private Methods

Method Description
ExtractDirectory ( string ArchiveOutputLocation ) : void
ZipDirectory ( Directory RootDirectory, Directory CurrentDirectory, object zStream ) : void

Adds a directory to a specific ZipStream

do not call this method directly, this method is designed be called in a recursive manor.

Method Details

CompressDirectory() public method

Compresses a directory using Zip compression into a specified directory
is recursive
public CompressDirectory ( string ArchiveOutputLocation, Directory ArchiveDirectory ) : void
ArchiveOutputLocation string the output directory path (including file name)
ArchiveDirectory System.IO.Directory the Directory object to be compressed
return void

CreateProvider() public static method

public static CreateProvider ( string ProviderName ) : Providers.BlogProvider
ProviderName string
return Providers.BlogProvider

DumpProvider() public method

Dumps the file store provider to a zip file, clears the old file store, switches and reloads a new providers clears the new file storage provider, then loads the new file store provider from the zip.
public DumpProvider ( string NewProviderName, string ArchiveOutputLocation ) : string
NewProviderName string The name of the new provider
ArchiveOutputLocation string The output archive location.
return string