This is part of the Fake.IO.FileSystem module.

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
Modifiers: inline

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 []
Modifiers: inline

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 []
Modifiers: inline

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
Modifiers: inline

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.