Namespaces

Types in Fake

Type FileHelper

Namespace Fake

Methods

Public static methods

bool allFiles(string path)

Includes all files

void AppendTextFiles(string newFileName, IEnumerable<string> files)

Appends all given files to one file.
Parameters
string newFileName

The target FileName.

IEnumerable<string> files

The original FileNames as a sequence.

void CleanDir(string path)

Cleans a directory

void CleanDirs(IEnumerable<string> dirs)

Clean multiple directories

bool CompareFiles(bool delete, string originalFileName, string compareFileName)

Compares the given files for changes If delete = true then equal files will be removed

void Copy(string target, IEnumerable<string> files)

Copies the files to the target.
Parameters
string target

The target directory.

IEnumerable<string> files

The original FileNames as a sequence.

FSharpList<string> CopyCached(string target, string cacheDir, IEnumerable<string> files)

Copies the files from a cache folder. If the files are not cached or the original files have a different write time the cache will be refreshed. The target FileName. The cache directory. The orginal files.

void CopyDir(string target, string source, FSharpFunc<string, bool> filterFile)

void CopyFile(string target, string fileName)

Copies a single file to the target and overwrites the existing file.
Parameters
string target

The target directory.

string fileName

The FileName.

void CopyFileIntoSubFolder(string target, string fileName)

Copies a single file to a relative subfolder of the target.
Parameters
string target

The target directory

string fileName

The fileName

void CopyFiles(string target, IEnumerable<string> files)

Copies the files to the target - Alias for Copy
Parameters
string target

The target FileName.

IEnumerable<string> files

FSharpList<string> copyRecursive(DirectoryInfo dir, DirectoryInfo outputDir, bool overwrite)

Copies the file structure recursive

FSharpFunc<bool, FSharpList<string>> CopyRecursive(string dir, string outputDir)

Copies the file structure recursive

FSharpFunc<IEnumerable<string>, Unit> CopyTo(string target)

Copies the given files to the target.
Parameters
string target

The target directory.

void CreateDir(string path)

Creates a directory if it does not exist

void CreateFile(string fileName)

Creates a file if it does not exist

void DeleteDir(string path)

Deletes a directory if it exists

void DeleteDirs(IEnumerable<string> dirs)

Delete multiple directories

void DeleteFile(string fileName)

Deletes a file if it exist

void DeleteFiles(IEnumerable<string> files)

Deletes files

bool excludeSVNFiles(string path)

Exclude SVN files (path with.svn)

bool FilesAreEqual(FileInfo first, FileInfo second)

Checks if the two files are byte-to-byte equal.

void GeneratePatch(string lastReleaseDir, string patchDir, IEnumerable<string> srcFiles)

Checks the srcFiles for changes to the last release.
Parameters
string lastReleaseDir

The directory of the last release.

string patchDir

The target directory.

IEnumerable<string> srcFiles

The source files.

void GeneratePatchWithFindOldFileFunction(string lastReleaseDir, string patchDir, IEnumerable<string> srcFiles, FSharpFunc<string, FSharpFunc<string, string>> findOldFileF)

IEnumerable<String[]> ReadCSVFile(string file)

Reads a csv file line by line delimiter is a ,

void recursively(FSharpFunc<DirectoryInfo, Unit> dirF, FSharpFunc<FileInfo, Unit> fileF, DirectoryInfo dir)

void Rename(string target, string fileName)

Renames the files to the target fileName.
Parameters
string target

The target FileName.

string fileName

void setDirectoryReadOnly(bool readOnly, DirectoryInfo dir)

Sets the directory readonly

void SetDirReadOnly(bool readOnly, DirectoryInfo dir)

Sets all files in the directory readonly

void SetReadOnly(bool readOnly, IEnumerable<string> files)

Sets all files in the directory readonly

void SilentCopy(string target, IEnumerable<string> files)

bool TestDir(string path)

Checks if the directory exists