Click or drag to resize

IVirtualFileSystemRead Method

Read the script's contents.

Namespace: WinWrap.Basic.Server
Assembly: WinWrap.Basic.Server (in WinWrap.Basic.Server.dll)
Syntax
string Read(
	string scriptPath
)

Parameters

scriptPath  String
The path of the script which is always in canonical form as returned by the Combine method.

Return Value

String
The contents of the script or directory.
Remarks
Implement this method to read the script's contents or a directory.
  • When ScriptPath does not end with \: Read the script's contents. Return the contents of the script. Throw an exception if the script can't be read.
  • v10.40+: When ScriptPath does end with \: Read a directory. Return %DIRECTORY% as the first line. Return the terminal names of the files and directories in the directory one per line. Append \ to the end of directory names. (A line is terminated with vbCrLf.) If %DIRECTORY% is not returned the Windows directory APIs will be used to determine the files and directories.
Example
IVirtualFileSystem implementation which uses the normal file system.
public string Read(string scriptPath)
{
    return File.ReadAllText(scriptPath);
}
See Also