ParserGetFileInfo Method (Stream, LoadOptions) |
Returns the general information about a file.
Namespace: GroupDocs.ParserAssembly: GroupDocs.Parser (in GroupDocs.Parser.dll) Version: 22.06.0
Syntaxpublic static FileInfo GetFileInfo(
Stream document,
LoadOptions loadOptions
)
Public Shared Function GetFileInfo (
document As Stream,
loadOptions As LoadOptions
) As FileInfo
public:
static FileInfo^ GetFileInfo(
Stream^ document,
LoadOptions^ loadOptions
)
static member GetFileInfo :
document : Stream *
loadOptions : LoadOptions -> FileInfo
Parameters
- document
- Type: System.IOStream
The source input stream. - loadOptions
- Type: GroupDocs.Parser.OptionsLoadOptions
The options to open the file.
Return Value
Type:
FileInfoAn instance of
FileInfo class.
ExamplesThe following code shows how to check a file type of the password-protected document:
Options.FileInfo info = Parser.GetFileInfo(document);
Console.WriteLine(info.IsEncrypted ? "Password is required" : "");
Console.WriteLine(info.FileType.ToString());
See Also