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

clearCache() → void
Clears the cached downloaded bytes.
getTemporalFolderPath() → String
Returns the absolute path to the system's temporary directory.
getUrlBytes(String url) → Future<Uint8List>
Retrieves downloaded bytes from cache or downloads them if not present.
hasPDFExtension(String filePath) → bool
Checks if the given file path has a PDF extension.
isImage(MergeInput input) → Future<bool>
Determines whether the given file path corresponds to an image file.
isPDF(MergeInput input) → Future<bool>
Determines whether the given file path corresponds to a PDF file.
prepareInput(MergeInput input) → Future<String>
Prepares a MergeInput for processing.
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.