initial
This commit is contained in:
@@ -10,7 +10,7 @@ namespace CarManagerV2
|
||||
{
|
||||
internal class SafeManager
|
||||
{
|
||||
public static void initializeFile(string path)
|
||||
public static void InitializeFile(string path)
|
||||
{
|
||||
if (!File.Exists(@path))
|
||||
{
|
||||
@@ -22,7 +22,7 @@ namespace CarManagerV2
|
||||
}
|
||||
}
|
||||
|
||||
public static List<Car> readCars(string path)
|
||||
public static List<Car> ReadCars(string path)
|
||||
{
|
||||
List<Car> cars = new List<Car>();
|
||||
using (StreamReader reader = new StreamReader(@path))
|
||||
@@ -32,19 +32,19 @@ namespace CarManagerV2
|
||||
{
|
||||
// Process the line
|
||||
if (line == "") continue;
|
||||
cars.Add(Car.fromCsvString(line));
|
||||
cars.Add(Car.FromCsvString(line));
|
||||
}
|
||||
}
|
||||
return cars;
|
||||
}
|
||||
|
||||
public static void saveCars(string path, List<Car> cars)
|
||||
public static void SaveCars(string path, List<Car> cars)
|
||||
{
|
||||
using (StreamWriter writer = new StreamWriter(@path))
|
||||
{
|
||||
foreach (Car car in cars)
|
||||
{
|
||||
writer.WriteLine(car.toCsvString());
|
||||
writer.WriteLine(car.ToCsvString());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user