Skip to main content

Search OfficeIMO

Enter a topic, API type, or PowerShell command.

Documentation Search all OfficeIMO/
Class

OneNoteFileProbe

OfficeIMO.OneNote

Namespace
OfficeIMO.OneNote
Assembly
OfficeIMO.OneNote
Source revision
be6c300e4ab1 with working tree changes
Modifiers
static

Performs bounded physical-header inspection for OneNote files.

Inheritance

  • object
  • OneNoteFileProbe

Methods

ReadHeader 2 overloads
public static OneNoteFileHeader ReadHeader(string path, OneNoteLoadOptions? options = null) #

Reads a OneNote header from a file path.

Parameters

path string required
options OfficeIMO.OneNote.OneNoteLoadOptions? = null optional
public static OneNoteFileHeader ReadHeader(Stream stream, OneNoteLoadOptions? options = null) #

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
ReadHeaderAsync 2 overloads
public static async Task<OneNoteFileHeader> ReadHeaderAsync(string path, OneNoteLoadOptions? options = null, CancellationToken cancellationToken = default) #

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) #

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>