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

DirectoryInfo

Functions and values

Function or valueDescription
DirectoryInfo.containsFile fileInfo dir
Signature: fileInfo:FileInfo -> dir:DirectoryInfo -> bool

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

DirectoryInfo.copyRecursiveTo(...)
Signature: overwrite:bool -> outputDir:DirectoryInfo -> dir:DirectoryInfo -> string list

Copies the file structure recursively.

DirectoryInfo.copyRecursiveToWithFilter(...)
Signature: overwrite:bool -> filter:(DirectoryInfo -> FileInfo -> bool) -> outputDir:DirectoryInfo -> dir:DirectoryInfo -> string list

Copies the file structure recursively, filtering files.

DirectoryInfo.ensure(dir)
Signature: dir:DirectoryInfo -> unit

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

DirectoryInfo.exists(dir)
Signature: dir:DirectoryInfo -> bool

Checks if the directory exists on disk.

DirectoryInfo.getFiles(dir)
Signature: dir:DirectoryInfo -> FileInfo []

Gets all files in the directory.

DirectoryInfo.getMatchingFiles(...)
Signature: pattern:string -> dir:DirectoryInfo -> FileInfo []

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

DirectoryInfo.getMatchingFilesRecursive(...)
Signature: pattern:string -> dir:DirectoryInfo -> FileInfo []

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

DirectoryInfo.getSubDirectories(dir)
Signature: dir:DirectoryInfo -> DirectoryInfo []

Gets all subdirectories of a given directory.

DirectoryInfo.isSubfolderOf dir2 dir1
Signature: dir2:DirectoryInfo -> dir1:DirectoryInfo -> bool

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

DirectoryInfo.ofPath(path)
Signature: path:string -> DirectoryInfo

Creates a DirectoryInfo for the given path.

DirectoryInfo.setReadOnly readOnly dir
Signature: readOnly:bool -> dir:DirectoryInfo -> unit

Sets the directory readonly

DirectoryInfo.setReadOnlyRecursive(...)
Signature: readOnly:bool -> dir:DirectoryInfo -> unit

Sets all files in the directory readonly recursively.