Remove another redundant GetFullFile

This commit is contained in:
Matt Nadareski
2024-05-21 20:49:26 -04:00
parent 8d334b7228
commit e4237fedef
2 changed files with 1 additions and 22 deletions

View File

@@ -33,6 +33,7 @@
- Separate out copy protection run
- Remove duplicate GetFullFile method
- Move GetBase64 to InfoTool
- Remove another redundant GetFullFile
### 3.1.9a (2024-05-21)

View File

@@ -280,28 +280,6 @@ namespace MPF.Core.ExecutionContexts
protected static bool DoesExist(List<string> parameters, int index)
=> index < parameters.Count;
/// <summary>
/// Get the full lines from the input file, if possible
/// </summary>
/// <param name="filename">file location</param>
/// <param name="binary">True if should read as binary, false otherwise (default)</param>
/// <returns>Full text of the file, null on error</returns>
protected static string? GetFullFile(string filename, bool binary = false)
{
// If the file doesn't exist, we can't get info from it
if (!File.Exists(filename))
return null;
// If we're reading as binary
if (binary)
{
byte[] bytes = File.ReadAllBytes(filename);
return BitConverter.ToString(bytes).Replace("-", string.Empty);
}
return File.ReadAllText(filename);
}
/// <summary>
/// Gets if the flag is supported by the current command
/// </summary>