C# Class WixSharp.DirFiles

Defines files of a given source directory to be installed on target system. Note that files in subdirectories are not included.

Use this class to define files to be automatically included into the deployment solution if their name matches specified wildcard character pattern (DirFiles.IncludeMask).

You can use DirFiles.ExcludeMasks to exclude certain files from setup if required.

This class is a logical equivalent of Files except that it analyses files in a single directory.

Note that all files matching the wildcard are resolved into absolute paths, so it may not always be suitable if the Wix# script is to be compiled into WiX XML source only (Compiler.WixSharp.Compiler.BuildWxs(WixSharp.Project)). This is not a problem if the Wix# script is compiled into MSI file (Compiler.Compiler.BuildMsi(WixSharp.Project)).
Inheritance: WixEntity
Datei anzeigen Open project: Eun/WixSharp

Public Properties

Property Type Description
Directory string
Feature Feature
Filter Predicate
IncludeMask string

Public Methods

Method Description
DirFiles ( Feature feature, string sourcePath ) : System

Initializes a new instance of the DirFiles class with properties/fields initialized with specified parameters.

DirFiles ( Feature feature, string sourcePath, Predicate filter ) : System

Initializes a new instance of the DirFiles class with properties/fields initialized with specified parameters.

DirFiles ( string sourcePath ) : System

Initializes a new instance of the DirFiles class with properties/fields initialized with specified parameters.

DirFiles ( string sourcePath, Predicate filter ) : System

Initializes a new instance of the DirFiles class with properties/fields initialized with specified parameters.

GetFiles ( string baseDirectory ) : File[]

Analyses baseDirectory and returns all files matching DirFiles.IncludeMask, which are not matching any DirFiles.ExcludeMasks.

Method Details

DirFiles() public method

Initializes a new instance of the DirFiles class with properties/fields initialized with specified parameters.
public DirFiles ( Feature feature, string sourcePath ) : System
feature Feature the directory files should be included in.
sourcePath string The relative path to directory source directory. It must include wildcard pattern for files to be included /// into MSI (e.g. new DirFiles(@"Release\Bin\*.*")).
return System

DirFiles() public method

Initializes a new instance of the DirFiles class with properties/fields initialized with specified parameters.
public DirFiles ( Feature feature, string sourcePath, Predicate filter ) : System
feature Feature the directory files should be included in.
sourcePath string The relative path to directory source directory. It must include wildcard pattern for files to be included /// into MSI (e.g. new DirFiles(@"Release\Bin\*.*")).
filter Predicate Filter to be applied for every file to be evaluated for the inclusion into MSI. /// (e.g. new Files(typical, @"Release\Bin\*.dll", f => !f.EndsWith(".Test.dll"))).
return System

DirFiles() public method

Initializes a new instance of the DirFiles class with properties/fields initialized with specified parameters.
public DirFiles ( string sourcePath ) : System
sourcePath string The relative path to directory source directory. It must include wildcard pattern for files to be included /// into MSI (new DirFiles(@"Release\Bin\*.*")).
return System

DirFiles() public method

Initializes a new instance of the DirFiles class with properties/fields initialized with specified parameters.
public DirFiles ( string sourcePath, Predicate filter ) : System
sourcePath string The relative path to directory source directory. It must include wildcard pattern for files to be included /// into MSI (e.g. new DirFiles(@"Release\Bin\*.*")).
filter Predicate Filter to be applied for every file to be evaluated for the inclusion into MSI. /// (e.g. new Files(typical, @"Release\Bin\*.dll", f => !f.EndsWith(".Test.dll"))).
return System

GetFiles() public method

Analyses baseDirectory and returns all files matching DirFiles.IncludeMask, which are not matching any DirFiles.ExcludeMasks.
public GetFiles ( string baseDirectory ) : File[]
baseDirectory string The base directory for file analysis. It is used in conjunction with /// relative .Though takes precedence if it is an absolute path.
return File[]

Property Details

Directory public_oe property

The relative path from source directory to directory to lookup for files matching the DirFiles.IncludeMask.
public string Directory
return string

Feature public_oe property

the directory files belong to.
public Feature,WixSharp Feature
return Feature

Filter public_oe property

The filter delegate. It is applied for every file to be evaluated for the inclusion into MSI.
public Predicate Filter
return Predicate

IncludeMask public_oe property

Wildcard pattern for files to be included into MSI.

Default value is *.*.

public string IncludeMask
return string