[Modify] Add it
This commit is contained in:
parent
3984739b5d
commit
7a6b2e3e5a
@ -113,6 +113,23 @@ namespace WebSocketSharp.Server
|
|||||||
return buff.ToString ().Replace ('\\', '/');
|
return buff.ToString ().Replace ('\\', '/');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private static bool tryReadFile (string path, out byte[] contents)
|
||||||
|
{
|
||||||
|
contents = null;
|
||||||
|
|
||||||
|
if (!File.Exists (path))
|
||||||
|
return false;
|
||||||
|
|
||||||
|
try {
|
||||||
|
contents = File.ReadAllBytes (path);
|
||||||
|
}
|
||||||
|
catch {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
#region Public Methods
|
#region Public Methods
|
||||||
|
Loading…
Reference in New Issue
Block a user