using System; using System.Collections.Generic; using System.IO; using System.Linq; using System.Text; using System.Threading.Tasks; namespace UnrealBuildTool { /// /// Static file methods. Contains similar methods to System.IO.File, but takes FileReference and DirectoryReference parameters. /// public static class FileExtensions { /// /// Checks whether a file exists /// /// File to check /// True if the file exists, false otherwise public static bool Exists(FileReference Location) { return System.IO.File.Exists(Location.FullName); } /// /// Deletes the given file /// /// File to delete public static void Delete(FileReference Location) { File.Delete(Location.FullName); } /// /// Reads the text from a given file /// /// File to read /// Text from the file public static string ReadAllText(FileReference Location) { return File.ReadAllText(Location.FullName); } } }