File Properties

MSBuild Extension Pack

File Properties MSBuild Extension Pack Help 4.0.12.0

The File type exposes the following members.

Properties

  Name Description
Public property AccessType
Set the AccessType. Can be Allow or Deny. Default is Allow.
Public property AvoidRegex
Set to true to avoid using Regular Expressions. This may increase performance for certain operations against large files.
Public property Checksum
Gets the file checksum
Public property CodeLinecount
Gets the number of code lines countered. This is calculated as Total - Comment - Empty
Public property CommentIdentifiers
Sets characters to be interpreted as comment identifiers. Semi-colon delimited. Only single line comments are currently supported.
Public property CommentLinecount
Gets the number of comment lines counted
Public property ElapsedTime
Gets the time taken to count the files. Value in seconds.
Public property EmptyLinecount
Gets the number of empty lines countered. Whitespace is ignored.
Public property ExcludedFilecount
Gets the number of excluded files
Public property ExcludedFiles
Item collection of files Excluded from the count.
Public property Files
An ItemList of files to process. If calling SetAttributes, RemoveAttributes or AddAttributes, include the attributes in an Attributes metadata tag, separated by a semicolon.
Public property IncludedFilecount
Gets the number of included files
Public property IncludedFiles
Item collection of files included after filtering operations
Public property Lines
Sets the Lines to use. For WriteLines this is interpreted as plain text. For RemoveLines this is interpreted as a regular expression
Public property MatchWholeLine
Used with AvoidRegex. Set to true to match the whole line. The default is false i.e. a line.Contains operation is used.
Public property MaxSize
Sets the maximum size of files to count
Public property MinSize
Sets the minimum size of files to count
Public property Path
A path to process or get. Use * for recursive folder processing. For the GetChecksum TaskAction, this indicates the path to the file to create a checksum for.
Public property Permission
A comma-separated list of FileSystemRights.
Public property RegexOptionList
Sets the Regular Expression options, e.g. None|IgnoreCase|Multiline|ExplicitCapture|Compiled|Singleline|IgnorePatternWhitespace|RightToLeft|RightToLeft|ECMAScript|CultureInvariant Default is RegexOptions.Compiled
Public property RegexPattern
Sets the regex pattern.
Public property Replacement
The replacement text to use. Default is string.Empty
Public property Result
Gets the result
Public property Size
Sets the size of the file in bytes for TaskAction="Create". This can be overridden by using a metadata tag called size on the Files items.
Public property TargetPath
Sets the TargetPath for a renamed file or to save concatenated files
Public property TextEncoding
The file encoding to write the new file in. The task will attempt to default to the current file encoding.
Public property TotalFilecount
Gets the number of files counted
Public property TotalLinecount
Gets the total number of lines counted
Public property Users
Sets the users collection. Use the Permission metadata tag to specify permissions. Separate pemissions with a comma.
Remarks

The Permission metadata is only used if the Permission property is not set.
<UsersCol Include="AUser">
    <Permission>Read,etc</Permission>
</UsersCol>
Top
See Also

Reference