FileHelperAliases Class

Summary

File helper aliases. A set of aliases for Cake Build to help with simple File operations such as Reading, Writing and Replacing text.
Assembly
Cake.FileHelpers.dll
Namespace
Cake.FileHelpers
Base Types
  • Object
graph BT Type-->Base0["Object"] Type["FileHelperAliases"] class Type type-node

Syntax

public static class FileHelperAliases

Attributes

Type Description
CakeAliasCategoryAttribute

Methods

Name Value Summary
FileAppendLines(ICakeContext, FilePath, Encoding, string[]) void
Appends all text lines to a file
static
FileAppendLines(ICakeContext, FilePath, string[]) void
Appends all text lines to a file
static
FileAppendText(ICakeContext, FilePath, Encoding, string) void
Appends all text to a file
static
FileAppendText(ICakeContext, FilePath, string) void
Appends all text to a file
static
FileReadLines(ICakeContext, FilePath, Encoding) string[]
Reads all lines from a file
static
FileReadLines(ICakeContext, FilePath) string[]
Reads all lines from a file
static
FileReadText(ICakeContext, FilePath, Encoding) string
Reads all text from a file
static
FileReadText(ICakeContext, FilePath) string
Reads all text from a file
static
FileTouch(ICakeContext, FilePath) void
Sets the last write time of a file to the current time
static
FileWriteLines(ICakeContext, FilePath, Encoding, string[]) void
Writes all text lines to a file
static
FileWriteLines(ICakeContext, FilePath, string[]) void
Writes all text lines to a file
static
FileWriteText(ICakeContext, FilePath, Encoding, string) void
Writes all text to a file
static
FileWriteText(ICakeContext, FilePath, string) void
Writes all text to a file
static
FindRegexInFiles(ICakeContext, string, Encoding, string, RegexOptions) FilePath[]
Finds files with regular expression pattern in files matching the given globber pattern.
static
FindRegexInFiles(ICakeContext, string, Encoding, string) FilePath[]
Finds files with regular expression pattern in files matching the given globber pattern.
static
FindRegexInFiles(ICakeContext, string, string, RegexOptions) FilePath[]
Finds files with regular expression pattern in files matching the given globber pattern.
static
FindRegexInFiles(ICakeContext, string, string) FilePath[]
Finds files with regular expression pattern in files matching the given globber pattern.
static
FindRegexMatchesGroupsInFile(ICakeContext, FilePath, Encoding, string, RegexOptions) List<List<Group>>
Finds regex matches in a file and returns all match groups.
static
FindRegexMatchesGroupsInFile(ICakeContext, FilePath, string, RegexOptions) List<List<Group>>
Finds regex matches in a file and returns all match groups.
static
FindRegexMatchesInFile(ICakeContext, FilePath, Encoding, string, RegexOptions) List<string>
Finds the regex matches in a text file.
static
FindRegexMatchesInFile(ICakeContext, FilePath, string, RegexOptions) List<string>
Finds the regex matches in a text file.
static
FindRegexMatchGroupInFile(ICakeContext, FilePath, Encoding, string, int, RegexOptions) Group
Finds the first regex match in a file and returns a specific match group.
static
FindRegexMatchGroupInFile(ICakeContext, FilePath, string, int, RegexOptions) Group
Finds the first regex match in a file and returns a specific match group.
static
FindRegexMatchGroupsInFile(ICakeContext, FilePath, Encoding, string, RegexOptions) List<Group>
Finds the first regex match in a file and returns all match groups.
static
FindRegexMatchGroupsInFile(ICakeContext, FilePath, string, RegexOptions) List<Group>
Finds the first regex match in a file and returns all match groups.
static
FindRegexMatchInFile(ICakeContext, FilePath, Encoding, string, RegexOptions) string
Finds the first regex match in a textfile.
static
FindRegexMatchInFile(ICakeContext, FilePath, string, RegexOptions) string
Finds the first regex match in a textfile.
static
FindTextInFiles(ICakeContext, IEnumerable<FilePath>, Encoding, string) FilePath[]
Finds files with the given text in files matching the given collection of files.
static
FindTextInFiles(ICakeContext, IEnumerable<FilePath>, string) FilePath[]
Finds files with the given text in files matching the given collection of files.
static
FindTextInFiles(ICakeContext, string, Encoding, string) FilePath[]
Finds files with the given text in files matching the given globber pattern.
static
FindTextInFiles(ICakeContext, string, string) FilePath[]
Finds files with the given text in files matching the given globber pattern.
static
ReplaceRegexInFiles(ICakeContext, string, Encoding, string, string, RegexOptions) FilePath[]
Replaces the regex pattern in files matched by the given globber pattern.
static
ReplaceRegexInFiles(ICakeContext, string, Encoding, string, string) FilePath[]
Replaces the regex pattern in files matched by the given globber pattern.
static
ReplaceRegexInFiles(ICakeContext, string, string, string, RegexOptions) FilePath[]
Replaces the regex pattern in files matched by the given globber pattern.
static
ReplaceRegexInFiles(ICakeContext, string, string, string) FilePath[]
Replaces the regex pattern in files matched by the given globber pattern.
static
ReplaceTextInFiles(ICakeContext, string, Encoding, string, string) FilePath[]
Replaces the text in files matched by the given globber pattern
static
ReplaceTextInFiles(ICakeContext, string, string, string) FilePath[]
Replaces the text in files matched by the given globber pattern
static

Extension Methods

Name Value Summary
ToDictionary() IDictionary<string, object>
Requires the Cake.DeployParams addin
ToStringWithNullMarkup() string
Requires the Cake.Issues addin