FileStringer class abstract
An abstract class that defines functionality for extracting textual content from files.
FileStringer is responsible for converting various file formats into stream of string content that can be further processed for ingestion. Different file formats (PDF, DOCX, XLSX, etc.) have specialized implementations that extend this abstract class.
Constructors
-
FileStringer.new({Set<
String> supportedFormats = const {}}) -
Creates a FileStringer with the specified supported formats.
const
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
-
supportedFormats
→ Set<
String> -
The set of file extensions that this stringer supports (e.g., {'pdf', 'docx'}).
final
Methods
-
isSupported(
File file) → bool - Checks if this stringer supports the given file based on its extension.
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
stream(
File file) → Stream< String> - Extracts text content from a file and returns it as a stream of strings.
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Static Methods
-
streamFile(
File file) → Stream< String> - Static method to stream text content from any supported file.