C# Class WixSharp.Files

Defines all files of a given source directory and all subdirectories to be installed on target system.

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

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

This class is a logical equivalent of DirFiles except it also analyses all files in all subdirectories. DirFiles excludes files in subdirectories.

Note that all files matching wildcard are resolved into absolute path thus 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)). Though it is not a problem at all if the Wix# script is compiled into MSI file (Compiler.Compiler.BuildMsi(WixSharp.Project)).
Inheritance: WixEntity
ファイルを表示 Open project: Eun/WixSharp Class Usage Examples

Public Properties

Property Type Description
Directory string
Feature Feature
Filter Predicate
IncludeMask string

Public Methods

Method Description
Files ( ) : System

Initializes a new instance of the Files class.

Files ( Feature feature, string sourcePath ) : System

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

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

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

Files ( string sourcePath ) : System

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

Files ( string sourcePath, Predicate filter ) : System

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

GetAllItems ( string baseDirectory ) : WixEntity[]

Analyses baseDirectory and returns all files (including subdirectories) matching Files.IncludeMask, which are not matching any Files.ExcludeMasks.

Method Details

Files() public method

Initializes a new instance of the Files class.
public Files ( ) : System
return System

Files() public method

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

Files() public method

Initializes a new instance of the Files class with properties/fields initialized with specified parameters.
public Files ( Feature feature, string sourcePath, Predicate filter ) : System
feature Feature the directory files should be included in.
sourcePath string The relative path to source directory. It must include wildcard pattern for files to be included /// into MSI (e.g. new Files(@"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

Files() public method

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

Files() public method

Initializes a new instance of the Files class with properties/fields initialized with specified parameters.
public Files ( string sourcePath, Predicate filter ) : System
sourcePath string The relative path to source directory. It must include wildcard pattern for files to be included /// into MSI (e.g. new Files(@"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

GetAllItems() public method

Analyses baseDirectory and returns all files (including subdirectories) matching Files.IncludeMask, which are not matching any Files.ExcludeMasks.
public GetAllItems ( string baseDirectory ) : WixEntity[]
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 WixEntity[]

Property Details

Directory public_oe property

The relative path to source directory to search for files matching the Files.IncludeMask.
public string Directory
return string

Feature public_oe property

the files belongs 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