FakeFileSystem Class

Summary

Represents a fake file system.
Namespace
Cake.Testing
Interfaces
Base Types
  • object
graph BT Type-->Base0["object"] Type-.->Interface0["IFileSystem"] click Interface0 "/api/Cake.Core.IO/IFileSystem" Type["FakeFileSystem"] class Type type-node

Syntax

public sealed class FakeFileSystem : IFileSystem

Constructors

Name Summary
FakeFileSystem(ICakeEnvironment) Initializes a new instance of the FakeFileSystem class.

Methods

Name Value Summary
GetDirectory(DirectoryPath) FakeDirectory
Gets a FakeDirectory instance representing the specified path.
GetFile(FilePath) FakeFile
Gets a FakeFile instance representing the specified path.

Extension Methods

Name Value Summary
CreateDirectory(DirectoryPath) FakeDirectory
Creates a directory at the specified path.
CreateFile(FilePath, byte[]) FakeFile
Creates a file at the specified path.
CreateFile(FilePath, FileAttributes) FakeFile
Creates a file at the specified path.
Dump<FakeFileSystem>() string
Get a basic string representation of specified object.
Requires the Cake.Incubator addin
EnsureFileDoesNotExist(FilePath) void
Ensures that the specified file does not exist.
Exist(DirectoryPath) bool
Determines if a specified DirectoryPath exist.
Exist(FilePath) bool
Determines if a specified FilePath exist.
IsIn<FakeFileSystem>(FakeFileSystem[]) bool
Checks if the source is contained in a list
Requires the Cake.Incubator addin
NotNull<FakeFileSystem>(string) void
Throws an exception if the specified parameter's value is null.
Requires the Cake.Ftp addin
NotNull<FakeFileSystem>(string) void
Throws an exception if the specified parameter's value is null.
Requires the Cake.Issues addin
ThrowIfNull<FakeFileSystem>(string, string) T
Throws a System.ArgumentNullException with a specific message if the value is null, otherwise returns the value
Requires the Cake.Incubator addin
ThrowIfNull<FakeFileSystem>(string) T
Throws a System.ArgumentNullException if the value is null, otherwise returns the value
Requires the Cake.Incubator addin
ToDictionary() IDictionary<string, object>
Requires the Cake.DeployParams addin