In The Hand LtdIn The Hand
FileHelper Class
NamespacesInTheHand.IOFileHelper
.NET Components for Mobility
Provides helper methods for the File class.
Declaration Syntax
C#Visual Basic
public static class FileHelper
Public NotInheritable Class FileHelper
Members
All MembersMethods



IconMemberDescription
AppendAllLines(String, IEnumerable<(Of <<'(String>)>>))
Appends lines to a file, and then closes the file.

AppendAllLines(String, IEnumerable<(Of <<'(String>)>>), Encoding)
Appends lines to a file by using a specified encoding, and then closes the file.

AppendAllText(String, String)
Appends the specified string to the file, creating the file if it does not already exist.

AppendAllText(String, String, Encoding)
Appends the specified string to the file, creating the file if it does not already exist.

Beam(String)
Beam a file through the standard OBEX Push mechanism using IrDA or Bluetooth.

GetContentType(String)
Returns the MIME content type for a specific file name.

ReadAllBytes(String)
Opens a binary file, reads the contents of the file into a byte array, and then closes the file.

ReadAllLines(String)
Opens a text file, reads all lines of the file, and then closes the file.

ReadAllLines(String, Encoding)
Opens a file, reads all lines of the file with the specified encoding, and then closes the file.

ReadAllText(String)
Opens a text file, reads all lines of the file, and then closes the file.

ReadAllText(String, Encoding)
Opens a file, reads all lines of the file with the specified encoding, and then closes the file.

WriteAllBytes(String, array<Byte>[]()[][])
Creates a new file, writes the specified byte array to the file, and then closes the file. If the target file already exists, it is overwritten.

WriteAllLines(String, array<String>[]()[][])
Creates a new file, writes the specified string array to the file using the default encoding, and then closes the file. If the target file already exists, it is overwritten.

WriteAllLines(String, array<String>[]()[][], Encoding)
Creates a new file, writes the specified string array to the file using the specified encoding, and then closes the file. If the target file already exists, it is overwritten.

WriteAllLines(String, IEnumerable<(Of <<'(String>)>>))
Creates a new file, writes a collection of strings to the file, and then closes the file.

WriteAllLines(String, IEnumerable<(Of <<'(String>)>>), Encoding)
Creates a new file by using the specified encoding, writes a collection of strings to the file, and then closes the file.

WriteAllText(String, String)
Creates a new file, writes the specified string array to the file, and then closes the file. If the target file already exists, it is overwritten.

WriteAllText(String, String, Encoding)
Creates a new file, writes the specified string array to the file using the specified encoding, and then closes the file. If the target file already exists, it is overwritten.

Remarks
For Windows Phone 7 all file paths are relative to the application package and only read-only operations are supported.
Inheritance Hierarchy
Object
FileHelper
See Also

Assembly: InTheHand (Module: InTheHand) Version: 7.0.0.0