|
Last change
on this file since 331 was 325, checked in by alloc, 7 years ago |
|
Code style cleanup (mostly whitespace changes, enforcing braces, using cleanup)
|
|
File size:
463 bytes
|
| Rev | Line | |
|---|
| [199] | 1 | using System;
|
|---|
| 2 | using System.IO;
|
|---|
| 3 |
|
|---|
| [325] | 4 | namespace AllocsFixes.FileCache {
|
|---|
| [199] | 5 | // Not caching at all, simply reading from disk on each request
|
|---|
| [325] | 6 | public class DirectAccess : AbstractCache {
|
|---|
| 7 | public override byte[] GetFileContent (string filename) {
|
|---|
| [199] | 8 | try {
|
|---|
| 9 | if (!File.Exists (filename)) {
|
|---|
| 10 | return null;
|
|---|
| 11 | }
|
|---|
| 12 |
|
|---|
| 13 | return File.ReadAllBytes (filename);
|
|---|
| 14 | } catch (Exception e) {
|
|---|
| 15 | Log.Out ("Error in DirectAccess.GetFileContent: " + e);
|
|---|
| 16 | }
|
|---|
| [325] | 17 |
|
|---|
| [199] | 18 | return null;
|
|---|
| 19 | }
|
|---|
| 20 | }
|
|---|
| [325] | 21 | }
|
|---|
Note:
See
TracBrowser
for help on using the repository browser.