// Create new CSV private void CreateCSV(DataToRecord dataToRecord, string folderPath) { // Create new CSV and Write in Data Headers on first line StreamWriter output = File.CreateText(GetCSVPath(dataToRecord, folderPath)); switch (dataToRecord) { case DataToRecord.HeadMovement: output.WriteLine("Time, Position, Rotation"); break; } output.Close(); }
// Returns the file path being used to store the data public string GetCSVPath(DataToRecord dataToRecord, string folderPath) { string File = ""; switch (dataToRecord) { case DataToRecord.HeadMovement: File += "/HeadMovement"; break; } return(folderPath + File + ".csv"); }