source: binary-improvements2/7dtd-server-fixes/src/FileCache/DirectAccess.cs@ 391

Last change on this file since 391 was 391, checked in by alloc, 2 years ago

Major refactoring/cleanup

File size: 438 bytes
RevLine 
[199]1using System;
2using System.IO;
3
[325]4namespace AllocsFixes.FileCache {
[199]5 // Not caching at all, simply reading from disk on each request
[325]6 public class DirectAccess : AbstractCache {
[351]7 public override byte[] GetFileContent (string _filename) {
[199]8 try {
[391]9 return File.Exists (_filename) ? File.ReadAllBytes (_filename) : null;
[199]10 } catch (Exception e) {
11 Log.Out ("Error in DirectAccess.GetFileContent: " + e);
12 }
[325]13
[199]14 return null;
15 }
16 }
[325]17}
Note: See TracBrowser for help on using the repository browser.