ParserGetFileInfo Method (String, LoadOptions)
Returns the general information about a file.

Namespace: GroupDocs.Parser
Assembly: GroupDocs.Parser (in GroupDocs.Parser.dll) Version: 22.06.0
Syntax
public static FileInfo GetFileInfo(
	string filePath,
	LoadOptions loadOptions
)

Parameters

filePath
Type: SystemString
The path to the file.
loadOptions
Type: GroupDocs.Parser.OptionsLoadOptions
The options to open the file.

Return Value

Type: FileInfo
An instance of FileInfo class.
Examples

The following code shows how to check a file type of the password-protected document:

C#
// Get a file info
Options.FileInfo info = Parser.GetFileInfo(filePath, new LoadOptions("password"));
// Check IsEncrypted property
Console.WriteLine(info.IsEncrypted ? "Password is required" : "");
// Print the file type
Console.WriteLine(info.FileType.ToString());
See Also