Summary
Represents a file. Not all implementations will support all
available methods and may throw
System.NotSupportedException
.
- Assembly
- Wyam
.Testing .dll - Namespace
- Wyam
.Testing .IO - Interfaces
- Base Types
-
- Object
graph BT
Type-->Base0["Object"]
Type-.->Interface0["IFile"]
click Interface0 "/api/Wyam.Common.IO/IFile"
Type-.->Interface1["IFileSystemEntry"]
click Interface1 "/api/Wyam.Common.IO/IFileSystemEntry"
Type["TestFile"]
class Type type-node
Syntax
public class TestFile : IFile, IFileSystemEntry
Constructors
Name | Summary |
---|---|
TestFile |
Properties
Methods
Name | Value | Summary |
---|---|---|
CopyTo |
void |
Copies the file to the specified destination file.
|
Delete |
void |
Deletes the file.
|
MoveTo |
void |
Moves the file to the specified destination file.
|
Open |
Stream |
Opens the file for reading and writing. This will either create the file
if it doesn't exist or overwrite it if it does.
|
OpenAppend |
Stream |
Opens the file for writing. This will either create the file
if it doesn't exist or append to it if it does.
|
OpenRead |
Stream |
Opens the file for reading. If it does not exist, an exception
will be thrown.
|
OpenWrite |
Stream |
Opens the file for writing. This will either create the file
if it doesn't exist or overwrite it if it does.
|
ReadAllText |
string |
Reads all text from the file.
|
WriteAllText |
void |
Writes the specified text to a file.
|