VirtualFileSystemWrite Method |
Write the script's contents.
Namespace: WinWrap.Basic.ServerAssembly: WinWrap.Basic.Server (in WinWrap.Basic.Server.dll)
Syntaxpublic void Write(
string scriptPath,
string text
)
Public Sub Write (
scriptPath As String,
text As String
)
public:
virtual void Write(
String^ scriptPath,
String^ text
) sealed
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.
Implements
IVirtualFileSystemWrite(String, String)
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