C# Class Axiom.FileSystem.FileSystemArchive

Specialization of the Archive class to allow reading of files from filesystem folders / directories.
Inheritance: Axiom.FileSystem.Archive
Show file Open project: WolfgangSt/axiom

Public Methods

Method Description
Create ( string filename, bool overwrite ) : Stream
Exists ( string fileName ) : bool
FileSystemArchive ( string name, string archType ) : System
Find ( string pattern, bool recursive ) : List
FindFileInfo ( string pattern, bool recursive ) : FileInfoList
List ( bool recursive ) : List
ListFileInfo ( bool recursive ) : FileInfoList
Load ( ) : void
Open ( string filename, bool readOnly ) : Stream
Unload ( ) : void

Protected Methods

Method Description
SafeDirectoryChange ( string directory, System.Action action ) : void
changeDirectory ( string dir ) : void

Utility method to change the current directory

findFiles ( string pattern, bool recursive, List simpleList, FileInfoList detailList ) : void

Utility method to retrieve all files in a directory matching pattern.

findFiles ( string pattern, bool recursive, List simpleList, FileInfoList detailList, string currentDir ) : void

Private Methods

Method Description
getFilesRecursively ( string dir, string pattern ) : string[]

Returns the names of all files in the specified directory that match the specified search pattern, performing a recursive search

popDirectory ( ) : void

Utility method to pop a previous directory off the stack and change to it

pushDirectory ( string dir ) : void

Utility method to change directory and push the current directory onto a stack

Method Details

Create() public method

public Create ( string filename, bool overwrite ) : Stream
filename string
overwrite bool
return Stream

Exists() public method

public Exists ( string fileName ) : bool
fileName string
return bool

FileSystemArchive() public method

public FileSystemArchive ( string name, string archType ) : System
name string
archType string
return System

Find() public method

public Find ( string pattern, bool recursive ) : List
pattern string
recursive bool
return List

FindFileInfo() public method

public FindFileInfo ( string pattern, bool recursive ) : FileInfoList
pattern string
recursive bool
return FileInfoList

List() public method

public List ( bool recursive ) : List
recursive bool
return List

ListFileInfo() public method

public ListFileInfo ( bool recursive ) : FileInfoList
recursive bool
return FileInfoList

Load() public method

public Load ( ) : void
return void

Open() public method

public Open ( string filename, bool readOnly ) : Stream
filename string
readOnly bool
return System.IO.Stream

SafeDirectoryChange() protected method

protected SafeDirectoryChange ( string directory, System.Action action ) : void
directory string
action System.Action
return void

Unload() public method

public Unload ( ) : void
return void

changeDirectory() protected method

Utility method to change the current directory
protected changeDirectory ( string dir ) : void
dir string
return void

findFiles() protected method

Utility method to retrieve all files in a directory matching pattern.
protected findFiles ( string pattern, bool recursive, List simpleList, FileInfoList detailList ) : void
pattern string File pattern
recursive bool Whether to cascade down directories
simpleList List Populated if retrieving a simple list
detailList FileInfoList Populated if retrieving a detailed list
return void

findFiles() protected method

protected findFiles ( string pattern, bool recursive, List simpleList, FileInfoList detailList, string currentDir ) : void
pattern string
recursive bool
simpleList List
detailList FileInfoList
currentDir string The current directory relative to the base of the archive, for file naming
return void