File Class

Definition

Represents information about a file.

public class File : Microsoft.Health.HealthRecordItem
Inheritance

Inherited Members

Constructors

File()

Creates a new instance of the File class with default values.

File(​String, ​Int64)

Creates a new instance of the File class with the specified name and size.

Fields

Type​Id

Retrieves the unique identifier for the item type.

Properties

Content

Gets the content of the file item.

Content​Stream

Gets a stream to read the file contents.

Content​Type

Gets or sets the type of content contained in the file.

Name

Gets or sets the name of the file including the extension if available.

Size

Gets or sets the file size.

Methods

Create​From​File​Path(​String, ​Codable​Value)

Creates a File item instance using the specified file path and content type.

Create​From​Stream(​Health​Record​Accessor, ​Stream, ​String, ​Codable​Value)

Creates a File item instance using the specified stream and content type.

Parse​Xml(​IX​Path​Navigable)

Populates this File instance from the data in the XML.

Set​Content(​String, ​Codable​Value)

Sets the content of the file instance using the specified file.

Set​Content(​Health​Record​Accessor, ​Stream, ​String, ​Codable​Value)

Sets the content of the file instance using the specified stream.

To​String()

Gets a string representation of the file item.

Write​Xml(​Xml​Writer)

Writes the file data to the specified XmlWriter.