[Modify] Add it

This commit is contained in:
sta 2017-06-20 15:57:43 +09:00
parent 3984739b5d
commit 7a6b2e3e5a

View File

@ -113,6 +113,23 @@ namespace WebSocketSharp.Server
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
#region Public Methods