1 |
afafbc22
|
Pultak
|
using System;
|
2 |
|
|
using System.Collections.Generic;
|
3 |
|
|
using System.Linq;
|
4 |
|
|
using System.Text;
|
5 |
|
|
using System.Threading.Tasks;
|
6 |
|
|
|
7 |
|
|
namespace LDClient.utils {
|
8 |
9657d7e0
|
silhavyj
|
|
9 |
|
|
/// <summary>
|
10 |
|
|
/// This class implements the IFileUtils interface
|
11 |
|
|
/// which defines IO operations.
|
12 |
|
|
/// </summary>
|
13 |
afafbc22
|
Pultak
|
public class FileUtils : IFileUtils {
|
14 |
9657d7e0
|
silhavyj
|
|
15 |
|
|
/// <summary>
|
16 |
|
|
/// Reads all lines of a files and returns them as a array.
|
17 |
|
|
/// </summary>
|
18 |
|
|
/// <param name="file">path to the file</param>
|
19 |
|
|
/// <returns>all the lines of the file (as an array)</returns>
|
20 |
afafbc22
|
Pultak
|
public string[] ReadFileAllLines(string file) {
|
21 |
|
|
return File.ReadAllLines(file);
|
22 |
|
|
}
|
23 |
|
|
}
|
24 |
|
|
}
|