Method | Description | |
---|---|---|
AppendAllText ( string path, string contents ) : void |
Appends the specified string the file, creating the file if it doesn't already exist.
|
|
Commit ( |
||
Copy ( string sourceFileName, string destFileName, bool overwrite ) : void |
Copies the specified sourceFileName to destFileName.
|
|
CreateDirectory ( string path ) : void |
Creates all directories in the specified path.
|
|
Delete ( string path ) : void |
Deletes the specified file or directory. An exception is not thrown if the file does not exist.
|
|
InDoubt ( |
||
Move ( string srcFileName, string destFileName ) : void |
Moves the specified file to a new location.
|
|
Prepare ( |
||
Rollback ( |
Notifies an enlisted object that a transaction is being rolled back (aborted). This is typically called on a different thread from the transaction thread. |
|
Snapshot ( string fileName ) : void |
Take a snapshot of the specified file. The snapshot is used to rollback the file later if needed.
|
|
TxEnlistment ( ) : System |
Initializes a new instance of the TxEnlistment class.
|
|
TxEnlistment ( |
Initializes a new instance of the TxEnlistment class.
|
|
WriteAllBytes ( string path, byte contents ) : void |
Creates a file, and writes the specified contents to the file. If the file already exists, it is overwritten.
|
|
WriteAllText ( string path, string contents ) : void |
Creates a file, write the specified contents to the file.
|
Method | Description | |
---|---|---|
Enlist ( ) : void |
public AppendAllText ( string path, string contents ) : void | ||
path | string | The file to append the string to. |
contents | string | The string to append to the file. |
return | void |
public Commit ( |
||
enlistment | ||
return | void |
public Copy ( string sourceFileName, string destFileName, bool overwrite ) : void | ||
sourceFileName | string | The file to copy. |
destFileName | string | The name of the destination file. |
overwrite | bool | true if the destination file can be overwritten, otherwise false. |
return | void |
public CreateDirectory ( string path ) : void | ||
path | string | The directory path to create. |
return | void |
public Delete ( string path ) : void | ||
path | string | The file to be deleted. |
return | void |
public InDoubt ( |
||
enlistment | ||
return | void |
public Move ( string srcFileName, string destFileName ) : void | ||
srcFileName | string | The name of the file to move. |
destFileName | string | The new path for the file. |
return | void |
public Prepare ( |
||
preparingEnlistment | ||
return | void |
public Rollback ( |
||
enlistment | A |
|
return | void |
public Snapshot ( string fileName ) : void | ||
fileName | string | The file to take a snapshot for. |
return | void |
public TxEnlistment ( |
||
tx | The Transaction. | |
return | System |
public WriteAllBytes ( string path, byte contents ) : void | ||
path | string | The file to write to. |
contents | byte | The bytes to write to the file. |
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 |