Note: This is the migration API reference for FAKE 5. The new (modularized) API documentation can be found here. If the API is already migrated you can check here if exists in a module. More information regarding the migration can be found here

OBSOLETE

Use Fake.IO instead (FAKE0001 - package: Fake.IO.FileSystem)

FileSystemHelper

Contains helpers which allow to interact with the file system.

Functions and values

Function or valueDescription
allFilesExist(files)
Signature: files:seq<string> -> bool
Attributes:
[<Obsolete("Use Fake.IO instead (FAKE0001 - package: Fake.IO.FileSystem - member: Fake.IO.File.allExist)")>]
OBSOLETE

Use Fake.IO instead (FAKE0001 - package: Fake.IO.FileSystem - member: Fake.IO.File.allExist)

Checks if all given files exist.

checkFileExists(fileName)
Signature: fileName:string -> unit
Attributes:
[<Obsolete("Use Fake.IO instead (FAKE0001 - package: Fake.IO.FileSystem - member: Fake.IO.File.checkExists)")>]
OBSOLETE

Use Fake.IO instead (FAKE0001 - package: Fake.IO.FileSystem - member: Fake.IO.File.checkExists)

Raises an exception if the file doesn't exist on disk.

currentDirectory
Signature: string

Gets the current directory.

directoryExists(dir)
Signature: dir:string -> bool
Attributes:
[<Obsolete("Use Fake.IO instead (FAKE0001 - package: Fake.IO.FileSystem - member: Fake.IO.DirectoryInfo.exists)")>]
OBSOLETE

Use Fake.IO instead (FAKE0001 - package: Fake.IO.FileSystem - member: Fake.IO.DirectoryInfo.exists)

Checks if the directory exists on disk.

directoryInfo(path)
Signature: path:string -> DirectoryInfo
Attributes:
[<Obsolete("Use Fake.IO instead (FAKE0001 - package: Fake.IO.FileSystem - member: Fake.IO.DirectoryInfo.ofPath)")>]
OBSOLETE

Use Fake.IO instead (FAKE0001 - package: Fake.IO.FileSystem - member: Fake.IO.DirectoryInfo.ofPath)

Creates a DirectoryInfo for the given path.

DirectoryName(fileName)
Signature: fileName:string -> string
Attributes:
[<Obsolete("Use Fake.IO instead (FAKE0001 - package: Fake.IO.FileSystem - member: Fake.IO.Path.getDirectory)")>]
OBSOLETE

Use Fake.IO instead (FAKE0001 - package: Fake.IO.FileSystem - member: Fake.IO.Path.getDirectory)

Gets the directory part of a filename.

ensureDirectory(dir)
Signature: dir:string -> unit
Attributes:
[<Obsolete("Use Fake.IO instead (FAKE0001 - package: Fake.IO.FileSystem - member: Fake.IO.Directory.ensure)")>]
OBSOLETE

Use Fake.IO instead (FAKE0001 - package: Fake.IO.FileSystem - member: Fake.IO.Directory.ensure)

Checks if the given directory exists. If not then this functions creates the directory.

ensureDirExists(dir)
Signature: dir:DirectoryInfo -> unit
Attributes:
[<Obsolete("Use Fake.IO instead (FAKE0001 - package: Fake.IO.FileSystem - member: Fake.IO.DirectoryInfo.ensure)")>]
OBSOLETE

Use Fake.IO instead (FAKE0001 - package: Fake.IO.FileSystem - member: Fake.IO.DirectoryInfo.ensure)

Ensure that directory chain exists. Create necessary directories if necessary.

fileExists(fileName)
Signature: fileName:string -> bool
Attributes:
[<Obsolete("Use Fake.IO instead (FAKE0001 - package: Fake.IO.FileSystem - member: Fake.IO.File.exists)")>]
OBSOLETE

Use Fake.IO instead (FAKE0001 - package: Fake.IO.FileSystem - member: Fake.IO.File.exists)

Checks if the file exists on disk.

fileInfo(path)
Signature: path:string -> FileInfo
Attributes:
[<Obsolete("Use Fake.IO instead (FAKE0001 - package: Fake.IO.FileSystem - member: Fake.IO.FileInfo.ofPath)")>]
OBSOLETE

Use Fake.IO instead (FAKE0001 - package: Fake.IO.FileSystem - member: Fake.IO.FileInfo.ofPath)

Creates a FileInfo for the given path.

filesInDir(dir)
Signature: dir:DirectoryInfo -> FileInfo []
Attributes:
[<Obsolete("Use Fake.IO instead (FAKE0001 - package: Fake.IO.FileSystem - member: Fake.IO.DirectoryInfo.getFiles)")>]
OBSOLETE

Use Fake.IO instead (FAKE0001 - package: Fake.IO.FileSystem - member: Fake.IO.DirectoryInfo.getFiles)

Gets all files in the directory.

filesInDirMatching pattern dir
Signature: pattern:string -> dir:DirectoryInfo -> FileInfo []
Attributes:
[<Obsolete("Use Fake.IO instead (FAKE0001 - package: Fake.IO.FileSystem - member: Fake.IO.DirectoryInfo.getMatchingFiles)")>]
OBSOLETE

Use Fake.IO instead (FAKE0001 - package: Fake.IO.FileSystem - member: Fake.IO.DirectoryInfo.getMatchingFiles)

Finds all the files in the directory matching the search pattern.

filesInDirMatchingRecursive pattern dir
Signature: pattern:string -> dir:DirectoryInfo -> FileInfo []
Attributes:
[<Obsolete("Use Fake.IO instead (FAKE0001 - package: Fake.IO.FileSystem - member: Fake.IO.DirectoryInfo.getMatchingFilesRecursive)")>]
OBSOLETE

Use Fake.IO instead (FAKE0001 - package: Fake.IO.FileSystem - member: Fake.IO.DirectoryInfo.getMatchingFilesRecursive)

Finds all the files in the directory and in all subdirectories matching the search pattern.

fileSystemInfo(path)
Signature: path:string -> FileSystemInfo
Attributes:
[<Obsolete("Use Fake.IO instead (FAKE0001 - package: Fake.IO.FileSystem - member: Fake.IO.FileSystemInfo.ofPath)")>]
OBSOLETE

Use Fake.IO instead (FAKE0001 - package: Fake.IO.FileSystem - member: Fake.IO.FileSystemInfo.ofPath)

Creates a FileInfo or a DirectoryInfo for the given path

FindFirstMatchingFile pattern dir
Signature: pattern:string -> dir:string -> string
Attributes:
[<Obsolete("Use Fake.IO instead (FAKE0001 - package: Fake.IO.FileSystem - member: Fake.IO.DirectoryInfo.findFirstMatchingFile)")>]
OBSOLETE

Use Fake.IO instead (FAKE0001 - package: Fake.IO.FileSystem - member: Fake.IO.DirectoryInfo.findFirstMatchingFile)

Gets the first file in the directory matching the search pattern or throws an error if nothing was found.

fullAssemblyPath
Signature: string

Get the full location of the current assembly.

FullName(fileName)
Signature: fileName:string -> string
Attributes:
[<Obsolete("Use Fake.IO instead (FAKE0001 - package: Fake.IO.FileSystem - member: Fake.IO.Path.getFullName)")>]
OBSOLETE

Use Fake.IO instead (FAKE0001 - package: Fake.IO.FileSystem - member: Fake.IO.Path.getFullName)

Converts a filename to it's full file system name.

isDirectory(path)
Signature: path:string -> bool

Detects whether the given path is a directory.

isFile(path)
Signature: path:string -> bool

Detects whether the given path is a file.

isInFolder dir fileInfo
Signature: dir:DirectoryInfo -> fileInfo:FileInfo -> bool
Attributes:
[<Obsolete("Use Fake.IO instead (FAKE0001 - package: Fake.IO.FileSystem - member: Fake.IO.DirectoryInfo.containsFile. NB: reverse parameters)")>]
OBSOLETE

Use Fake.IO instead (FAKE0001 - package: Fake.IO.FileSystem - member: Fake.IO.DirectoryInfo.containsFile. NB: reverse parameters)

Checks if the file is in a subfolder of the dir.

isSubfolderOf dir2 dir1
Signature: dir2:DirectoryInfo -> dir1:DirectoryInfo -> bool
Attributes:
[<Obsolete("Use Fake.IO instead (FAKE0001 - package: Fake.IO.FileSystem - member: Fake.IO.DirectoryInfo.isSubfolderOf)")>]
OBSOLETE

Use Fake.IO instead (FAKE0001 - package: Fake.IO.FileSystem - member: Fake.IO.DirectoryInfo.isSubfolderOf)

Checks if dir1 is a subfolder of dir2. If dir1 equals dir2 the function returns also true.

isValidPath(path)
Signature: path:string -> bool

Detects whether the given path does not contains invalid characters.

normalizeFileName(fileName)
Signature: fileName:string -> string

Normalizes a filename.

subDirectories(dir)
Signature: dir:DirectoryInfo -> DirectoryInfo []
Attributes:
[<Obsolete("Use Fake.IO instead (FAKE0001 - package: Fake.IO.FileSystem - member: Fake.IO.DirectoryInfo.getSubDirectories)")>]
OBSOLETE

Use Fake.IO instead (FAKE0001 - package: Fake.IO.FileSystem - member: Fake.IO.DirectoryInfo.getSubDirectories)

Gets all subdirectories of a given directory.

TryFindFirstMatchingFile pattern dir
Signature: pattern:string -> dir:string -> string option
Attributes:
[<Obsolete("Use Fake.IO instead (FAKE0001 - package: Fake.IO.FileSystem - member: Fake.IO.DirectoryInfo.tryFindFirstMatchingFile)")>]
OBSOLETE

Use Fake.IO instead (FAKE0001 - package: Fake.IO.FileSystem - member: Fake.IO.DirectoryInfo.tryFindFirstMatchingFile)

Gets the first file in the directory matching the search pattern as an option value.