Show / Hide Table of Contents

Class FileHelpers

Inheritance
System.Object
FileHelpers
Namespace: Xamarin
Assembly: Xamarin.Helpers.dll
Syntax
public static class FileHelpers

Methods

| Improve this Doc View Source

DetectFileLineEnding(String)

Returns either "\r\n" (Windows CRLF ending), "\n" (Unix LF ending), "\r" (Legacy Mac CR ending), or null (no endings detected) based on the first occurrence of a valid line ending in the file.

Declaration
public static string DetectFileLineEnding(string fileName)
Parameters
Type Name Description
System.String fileName
Returns
Type Description
System.String
| Improve this Doc View Source

FileContentsAreEqual(String, String)

Compare the contents of files on disk file1 and file2 for byte equality.

Declaration
public static bool FileContentsAreEqual(string file1, string file2)
Parameters
Type Name Description
System.String file1
System.String file2
Returns
Type Description
System.Boolean

Returns true if the files have the same byte content.

| Improve this Doc View Source

StreamContentsAreEqual(Stream, Stream)

Compare the contents of streams stream1 and stream2 for byte equality.

Declaration
public static bool StreamContentsAreEqual(Stream stream1, Stream stream2)
Parameters
Type Name Description
System.IO.Stream stream1
System.IO.Stream stream2
Returns
Type Description
System.Boolean

Returns true if the streams have the same byte content.

  • Improve this Doc
  • View Source
Back to top Generated by DocFX