HttpRequestEventArgsTryReadFile Method |
Tries to read the specified file from the document folder of
the
HttpServer.
Namespace:
Sfs2X.WebSocketSharp.Server
Assembly:
SmartFox2X (in SmartFox2X.dll) Version: 1.8.0.0 (1.8.0)
Syntax public bool TryReadFile(
string path,
out byte[] contents
)
Parameters
- path
- Type: SystemString
A String that represents a virtual path to
find the file from the document folder.
- contents
- Type: SystemByte
When this method returns, an array of Byte or
if it fails.
That array receives the contents of the file.
Return Value
Type:
Booleantrue if it succeeds to read; otherwise,
false.
Exceptions Exception | Condition |
---|
ArgumentNullException | path is .
|
ArgumentException | path is an empty string.
-or-
path contains "..".
|
See Also