C# Класс 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)).
Наследование: WixEntity
Показать файл Открыть проект

Открытые свойства

Свойство Тип Описание
Directory string
Feature Feature
Filter Predicate
IncludeMask string

Открытые методы

Метод Описание
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.

Описание методов

DirFiles() публичный Метод

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\*.*")).
Результат System

DirFiles() публичный Метод

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"))).
Результат System

DirFiles() публичный Метод

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\*.*")).
Результат System

DirFiles() публичный Метод

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"))).
Результат System

GetFiles() публичный Метод

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.
Результат File[]

Описание свойств

Directory публичное свойство

The relative path from source directory to directory to lookup for files matching the DirFiles.IncludeMask.
public string Directory
Результат string

Feature публичное свойство

the directory files belong to.
public Feature,WixSharp Feature
Результат Feature

Filter публичное свойство

The filter delegate. It is applied for every file to be evaluated for the inclusion into MSI.
public Predicate Filter
Результат Predicate

IncludeMask публичное свойство

Wildcard pattern for files to be included into MSI.

Default value is *.*.

public string IncludeMask
Результат string