Method | Description | |
---|---|---|
AppendAllLines ( string path, IEnumerable |
Appends lines to a file, and then closes the file.
|
|
AppendAllLines ( string path, IEnumerable |
Appends lines to a file by using a specified encoding, and then closes the file.
|
|
AppendAllText ( string path, string contents ) : void |
Opens a file, appends the specified string to the file, and then closes the file. If the file does not exist, this method creates a file, writes the specified string to the file, then closes the file.
|
|
AppendAllText ( string path, string contents, |
Appends the specified string to the file, creating the file if it does not already exist.
|
|
CopyFile ( string sourceFileName, string destinationFileName ) : void |
Copies an existing file to a new file.
|
|
CopyFile ( string sourceFileName, string destinationFileName, bool overwrite ) : void |
Copies an existing file to a new file, and optionally overwrites an existing file.
|
|
CreateDirectory ( string dir ) : void |
Creates a directory in the storage scope.
|
|
CreateFile ( string path ) : |
Creates a file in the store.
|
|
DeleteDirectory ( string dir ) : void |
Deletes a directory in the storage scope.
|
|
DeleteFile ( string path ) : void |
Deletes the specified file.
|
|
DirectoryExists ( string dir ) : bool |
Determines whether the specified path refers to an existing directory in the store.
|
|
FileExists ( string path ) : bool |
Determines whether the specified path refers to an existing file in the store.
|
|
GetDirectoryNames ( ) : string[] |
Enumerates the directories in the root of a store.
|
|
GetDirectoryNames ( string searchPattern ) : string[] |
Enumerates directories in a storage scope that match a given pattern.
|
|
GetFileNames ( ) : string[] |
Obtains the names of files in the root of a store.
|
|
GetFileNames ( string searchPattern ) : string[] |
Enumerates files in storage scope that match a given pattern.
|
|
IncreaseQuotaTo ( long newQuotaSize ) : bool |
Enables an application to explicitly request a larger quota size, in bytes.
|
|
MoveDirectory ( string sourceDirectoryName, string destinationDirectoryName ) : void |
Moves a specified directory and its contents to a new location.
|
|
MoveFile ( string sourceFileName, string destinationFileName ) : void |
Moves a specified file to a new location, and optionally lets you specify a new file name.
|
|
OpenFile ( string path, FileMode mode ) : |
Opens a file in the specified mode.
|
|
OpenFile ( string path, FileMode mode, FileAccess access ) : |
Opens a file in the specified mode with the specified file access.
|
|
OpenFile ( string path, FileMode mode, FileAccess access, FileShare share ) : |
Opens a file in the specified mode with read, write, or read/write access and the specified sharing option.
|
|
ReadAllBytes ( string path ) : byte[] |
Opens a binary file, reads the contents of the file into a byte array, and then closes the file. Returns null, if an exception is raised.
|
|
ReadAllLines ( string path ) : string[] |
Opens a text file, reads all lines of the file, and then closes the file.
|
|
ReadAllLines ( string path, |
Opens a file, reads all lines of the file with the specified encoding, and then closes the file.
|
|
ReadAllText ( string path ) : string |
Opens a text file, reads all lines of the file, and then closes the file.
|
|
ReadAllText ( string path, |
Opens a file, reads all lines of the file with the specified encoding, and then closes the file.
|
|
ReadLines ( string path ) : IEnumerable |
Reads the lines of a file.
|
|
ReadLines ( string path, |
Reads the lines of a file that has a specified encoding.
|
|
WriteAllBytes ( string path, byte bytes ) : void |
Creates a new file, writes the specified byte array to the file, and then closes the file. If the target file already exists, it is overwritten.
|
|
WriteAllLines ( string path, IEnumerable |
Creates a new file, writes a collection of strings to the file, and then closes the file.
|
|
WriteAllLines ( string path, IEnumerable |
Creates a new file by using the specified encoding, writes a collection of strings to the file, and then closes the file.
|
|
WriteAllText ( string path, string contents ) : void |
Creates a new file, writes the specified string to the file, and then closes the file. If the target file already exists, it is overwritten.
|
|
WriteAllText ( string path, string contents, |
Creates a new file, writes the specified string to the file using the specified encoding, and then closes the file. If the target file already exists, it is overwritten.
|
public AppendAllLines ( string path, IEnumerable |
||
path | string | The file to append the lines to. The file is created if it does not already exist. |
contents | IEnumerable |
The lines to append to the file. |
return | void |
public AppendAllLines ( string path, IEnumerable |
||
path | string | The file to append the lines to. The file is created if it does not already exist. |
contents | IEnumerable |
The lines to append to the file. |
encoding | The character encoding to use. | |
return | void |
public AppendAllText ( string path, string contents ) : void | ||
path | string | The file to append the specified string to. |
contents | string | The string to append to the file. |
return | void |
public AppendAllText ( string path, string contents, |
||
path | string | The file to append the specified string to. |
contents | string | The string to append to the file. |
encoding | The character encoding to use. | |
return | void |
public CopyFile ( string sourceFileName, string destinationFileName ) : void | ||
sourceFileName | string | The name of the file to copy. |
destinationFileName | string | The name of the destination file. This cannot be a directory or an existing file. |
return | void |
public CopyFile ( string sourceFileName, string destinationFileName, bool overwrite ) : void | ||
sourceFileName | string | The name of the file to copy. |
destinationFileName | string | The name of the destination file. This cannot be a directory. |
overwrite | bool | true if the destination file can be overwritten; otherwise, false. |
return | void |
public CreateDirectory ( string dir ) : void | ||
dir | string | The relative path of the directory to create within the storage. |
return | void |
public CreateFile ( string path ) : |
||
path | string | The relative path of the file to be created in the store. |
return |
public DeleteDirectory ( string dir ) : void | ||
dir | string | The relative path of the directory to delete within the storage scope. |
return | void |
public DeleteFile ( string path ) : void | ||
path | string | The name of the file to be deleted. Wildcard characters are not supported. |
return | void |
public DirectoryExists ( string dir ) : bool | ||
dir | string | The path to test. |
return | bool |
public FileExists ( string path ) : bool | ||
path | string | The path and file name to test. |
return | bool |
public GetDirectoryNames ( string searchPattern ) : string[] | ||
searchPattern | string | A search pattern. Both single-character ("?") and multi-character ("*") wildcards are supported. |
return | string[] |
public GetFileNames ( string searchPattern ) : string[] | ||
searchPattern | string | A search pattern. Both single-character ("?") and multi-character ("*") wildcards are supported. |
return | string[] |
public IncreaseQuotaTo ( long newQuotaSize ) : bool | ||
newQuotaSize | long | The requested size, in bytes. |
return | bool |
public MoveDirectory ( string sourceDirectoryName, string destinationDirectoryName ) : void | ||
sourceDirectoryName | string | The name of the directory to move. |
destinationDirectoryName | string | The path to the new location for sourceDirectoryName. This cannot be the path to an existing directory. |
return | void |
public MoveFile ( string sourceFileName, string destinationFileName ) : void | ||
sourceFileName | string | The name of the file to move. |
destinationFileName | string | The path to the new location for the file. If a file name is included, the moved file will have that name. |
return | void |
public OpenFile ( string path, FileMode mode ) : |
||
path | string | The relative path of the file within the store. |
mode | FileMode | The mode in which to open the file. |
return |
public OpenFile ( string path, FileMode mode, FileAccess access ) : |
||
path | string | The relative path of the file within the store. |
mode | FileMode | The mode in which to open the file. |
access | FileAccess | The type of access to open the file with. |
return |
public OpenFile ( string path, FileMode mode, FileAccess access, FileShare share ) : |
||
path | string | The relative path of the file within the store. |
mode | FileMode | The mode in which to open the file. |
access | FileAccess | The type of access to open the file with. |
share | FileShare | The type of access other |
return |
public ReadAllBytes ( string path ) : byte[] | ||
path | string | The file to open for reading. |
return | byte[] |
public ReadAllLines ( string path ) : string[] | ||
path | string | The file to open for reading. |
return | string[] |
public ReadAllLines ( string path, |
||
path | string | The file to open for reading. |
encoding | The encoding applied to the contents of the file. | |
return | string[] |
public ReadAllText ( string path ) : string | ||
path | string | The file to open for reading. |
return | string |
public ReadAllText ( string path, |
||
path | string | The file to open for reading. |
encoding | The encoding applied to the contents of the file. | |
return | string |
public ReadLines ( string path ) : IEnumerable |
||
path | string | The file to read. |
return | IEnumerable |
public ReadLines ( string path, |
||
path | string | The file to read. |
encoding | The encoding that is applied to the contents of the file. | |
return | IEnumerable |
public WriteAllBytes ( string path, byte bytes ) : void | ||
path | string | The file to write to. |
bytes | byte | The bytes to write to the file. |
return | void |
public WriteAllLines ( string path, IEnumerable |
||
path | string | The file to write to. |
contents | IEnumerable |
The lines to write to the file. |
return | void |
public WriteAllLines ( string path, IEnumerable |
||
path | string | The file to write to. |
contents | IEnumerable |
The lines to write to the file. |
encoding | The character encoding to use. | |
return | void |
public WriteAllText ( string path, string contents ) : void | ||
path | string | The file to write to. |
contents | string | The string to write to the file. |
return | void |
public WriteAllText ( string path, string contents, |
||
path | string | The file to write to. |
contents | string | The string to write to the file. |
encoding | The encoding to apply to the string. | |
return | void |