Namespace: Contracts.IO
Assembly: Contracts (in Contracts.dll)

Public Class File
This language is not supported or no code example is available.
public static class File
This language is not supported or no code example is available.
public ref class File 
This language is not supported or no code example is available.
public class File
This language is not supported or no code example is available.
Name Description
Public method Static AppendAllText(string, string) Append all text
Public method Static Copy(string, string) Copy a file
Public method Static Copy(string, string, bool) Copy a file
Public method Static Create(string) Create a file
Public method Static Delete(string, bool) Delete a file
Public method Equals(Object) Determines whether the specified object is equal to the current object. (inherited from Object).
Public method Static Exists(string) Does a file exist?
Protected method Finalize Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection. (inherited from Object).
Public method Static GetAttributes(string) Get file attributes
Public method Static GetCreationTime(string) Get the creation time
Public method Static GetCreationTimeUtc(string) Get the creation utc time
Public method GetHashCode Serves as the default hash function. (inherited from Object).
Public method Static GetLastAccessTime(string) Get the last access time
Public method Static GetLastAccessTimeUtc(string) Get the last access time in utc
Public method Static GetLastWriteTime(string) Get the last write time
Public method Static GetLastWriteTimeUtc(string) Get the last write time
Public method GetType Gets the Type of the current instance. (inherited from Object).
Protected method MemberwiseClone Creates a shallow copy of the current Object. (inherited from Object).
Public method Static Move(string, string) Move a file
Public method Static Open(string, FileMode) Open a file
Public method Static Open(string, FileMode, FileAccess) Open a file
Public method Static Open(string, FileMode, FileAccess, FileShare) Open a file
Public method Static OpenRead(string) Open a file for reading
Public method Static OpenWrite(string) Open a file for writing
Public method Static ReadAllBytes(string) Read all bytes
Public method Static ReadAllLines(string) Read all lines
Public method Static ReadAllText(string) Read all lines
Public method Static SafeDelete(string) Delete - but swallow any exceptions - usually useful for the temp space
Public method Static SetAttributes(string, FileAttributes) Set some file attributes
Public method Static SetCreationTime(string, DateTime) Set the creation time
Public method Static SetCreationTimeUtc(string, DateTime) Set the creation time in utc
Public method Static SetLastWriteTime(string, DateTime) Set the last write time
Public method Static SetLastWriteTimeUtc(string, DateTime) Set the last write time in utc
Public method ToString Returns a string that represents the current object. (inherited from Object).
Public method Static WriteAllBytes(string, byte[]) Write all bytes
Public method Static WriteAllLines(string, IEnumerable<String>) Write all lines
Public method Static WriteAllLines(string, string[]) Write all lines
Public method Static WriteAllText(string, string) Write all text
Public method Static WriteAllText(string, string, Encoding) Write all text
Top

.NET Framework

Supported in: 4.5, 4.5.1, 4.5.2, 4.6, 4.6.1, 4.6.2, 4.7, 4.7.1