NuGet.Program.RemoveOldFile C# (CSharp) Method

RemoveOldFile() private method

private RemoveOldFile ( IFileSystem fileSystem ) : void
fileSystem IFileSystem
return void
        internal static void RemoveOldFile(IFileSystem fileSystem)
        {
            string oldFile = typeof(Program).Assembly.Location + ".old";
            try
            {
                if (fileSystem.FileExists(oldFile))
                {
                    fileSystem.DeleteFile(oldFile);
                }
            }
            catch
            {
                // We don't want to block the exe from usage if anything failed
            }
        }