DocumentUtils class

Utility class for handling document-related checks in a file system environment.

This implementation is designed for platforms with direct file system access, such as Windows, macOS, Linux, Android, and iOS. The filePath parameter should be a valid local file path.

Note: This class is not used on web platforms, which have their own file handling implementation through DocumentUtilsWeb.

Constructors

DocumentUtils()

Properties

hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited

Static Methods

getTemporalFolderPath() String
Returns the absolute path to the system's temporary directory.
hasPDFExtension(String filePath) bool
Checks if the given file path has a PDF extension.
isImage(String filePath) Future<bool>
Determines whether the given file path corresponds to an image file.
isPDF(String filePath) Future<bool>
Determines whether the given file path corresponds to a PDF file.
removeTemporalFiles(List<String> paths) → void
Removes a list of temporary files from the file system.
setTemporalFolderPath(String path) → void
Sets a custom temporary folder path for the library to use.