# OneNoteFileProbe

Performs bounded physical-header inspection for OneNote files.

Class 

`OfficeIMO.OneNote`

**Namespace**

`OfficeIMO.OneNote`

**Assembly**

`OfficeIMO.OneNote`

**Source revision**

`be6c300e4ab1` with working tree changes

**Source**

[OneNoteFileProbe.cs:9](https://github.com/EvotecIT/OfficeIMO/blob/be6c300e4ab1859837b961c64fbfb2b2a1886cd0/Sources/OfficeIMO.OneNote/Reading/OneNoteFileProbe.cs#L9)

**Modifiers**

static

Performs bounded physical-header inspection for OneNote files.

## Inheritance

- object
- OneNoteFileProbe

Filter members 

Show inherited

## Methods

ReadHeader 2 overloads

`public static OneNoteFileHeader ReadHeader(string path, OneNoteLoadOptions? options = null)` [#](#method-readheader-string-officeimo-onenote-onenoteloadoptions)

[OneNoteFileProbe.cs:9](https://github.com/EvotecIT/OfficeIMO/blob/be6c300e4ab1859837b961c64fbfb2b2a1886cd0/Sources/OfficeIMO.OneNote/Reading/OneNoteFileProbe.cs#L9)

Reads a OneNote header from a file path.

Parameters

**path string required**

**options OfficeIMO.OneNote.OneNoteLoadOptions? = null optional**

Returns

`OneNoteFileHeader`

`public static OneNoteFileHeader ReadHeader(Stream stream, OneNoteLoadOptions? options = null)` [#](#method-readheader-io-stream-officeimo-onenote-onenoteloadoptions)

[OneNoteFileProbe.cs:42](https://github.com/EvotecIT/OfficeIMO/blob/be6c300e4ab1859837b961c64fbfb2b2a1886cd0/Sources/OfficeIMO.OneNote/Reading/OneNoteFileProbe.cs#L42)

Reads a OneNote header from a caller-owned stream. Seekable streams are read from the beginning and restored to their original position. Non-seekable streams are consumed only through the physical header prefix.

Parameters

**stream System.IO.Stream required**

**options OfficeIMO.OneNote.OneNoteLoadOptions? = null optional**

Returns

`OneNoteFileHeader`

ReadHeaderAsync 2 overloads

`public static async Task<OneNoteFileHeader> ReadHeaderAsync(string path, OneNoteLoadOptions? options = null, CancellationToken cancellationToken = default)` [#](#method-readheaderasync-string-officeimo-onenote-onenoteloadoptions-threading-cancellationtoken)

Asynchronously reads a OneNote header from a file path.

Parameters

**path string required**

**options OfficeIMO.OneNote.OneNoteLoadOptions? = null optional**

**cancellationToken System.Threading.CancellationToken = default optional**

Returns

`Task<OneNoteFileHeader>`

`public static Task<OneNoteFileHeader> ReadHeaderAsync(Stream stream, OneNoteLoadOptions? options = null, CancellationToken cancellationToken = default)` [#](#method-readheaderasync-io-stream-officeimo-onenote-onenoteloadoptions-threading-cancellationtoken)

[OneNoteFileProbe.cs:58](https://github.com/EvotecIT/OfficeIMO/blob/be6c300e4ab1859837b961c64fbfb2b2a1886cd0/Sources/OfficeIMO.OneNote/Reading/OneNoteFileProbe.cs#L58)

Asynchronously reads a OneNote header from a caller-owned stream. Seekable streams are restored to their original position after the read.

Parameters

**stream System.IO.Stream required**

**options OfficeIMO.OneNote.OneNoteLoadOptions? = null optional**

**cancellationToken System.Threading.CancellationToken = default optional**

Returns

`Task<OneNoteFileHeader>`

## Inherited Methods

`public virtual bool Equals(object? obj)` [#](#method-equals-object)

Inherited from object

Parameters

**obj object? required**

Returns

`bool`

`public virtual int GetHashCode()` [#](#method-gethashcode)

Inherited from object

Returns

`int`

`public Type GetType()` [#](#method-gettype)

Inherited from object

Returns

`Type`

`public virtual string? ToString()` [#](#method-tostring)

Inherited from object

Returns

`string?`

<!-- PowerForge markdown artifact sha256:EA7A442858A079E116A98D9FFE56AA540B2DE894A57F919C823F42CB519525E1 -->
