IVirtualFileSystemWrite Method |
Write the script's contents.
Namespace: WinWrap.Basic.ServerAssembly: WinWrap.Basic.Server (in WinWrap.Basic.Server.dll)
Syntaxvoid Write(
string scriptPath,
string text
)
Sub Write (
scriptPath As String,
text As String
)
void Write(
String^ scriptPath,
String^ text
)
Parameters
- scriptPath String
-
The path of the script which is always in canonical form as returned by Combine(String, String).
- text String
-
The contents of the script.
Remarks
Implement this method to write the script's contents.
Throw an exception if the script can't be read.
Example
IVirtualFileSystem implementation which uses the normal file system.
public void Write(string scriptPath, string text)
{
File.WriteAllText(scriptPath, text, System.Text.Encoding.UTF8);
}
Sub Write(ByVal scriptPath As String, ByVal text As String)
File.WriteAllText(scriptPath, text, System.Text.Encoding.UTF8)
End Function
See Also