WordCollectionIo class
Provides utilities for reading and managing word collections and optional metadata from files, with support for in-memory caching and header handling.
Constructors
- WordCollectionIo()
- Creates a new WordCollectionIo instance.
Properties
- collectionPath → String?
-
Returns the file path to the word collection.
no setter
- getCollectionFromMemory → FileContents?
-
Returns the word collection loaded in memory, if available.
no setter
- getMetadataFromMemory → FileContents?
-
Returns the metadata loaded in memory, if available.
no setter
- hashCode → int
-
The hash code for this object.
no setterinherited
- hasHeaders → bool
-
Returns whether the files are expected to have header rows.
no setter
- isInitialized → bool
-
Indicates whether the IO utility has been initialized with file paths.
no setter
- metadataPath → String?
-
Returns the file path to the metadata collection.
no setter
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- saveToMemory → bool
-
Returns whether file contents should be cached in memory after reading.
no setter
Methods
-
getCharacterMetadata(
) → Future< FileContents> -
Returns the character metadata as a
FileContentsobject. -
getWordCollection(
) → Future< FileContents> -
Returns the word collection as a
FileContentsobject. -
init(
{required String collectionPath, String? metadataPath, bool saveToMemory = false, bool hasHeaders = true}) → bool - Initializes the IO utility with the given file paths and options.
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
readFile(
String filePath) → Future< FileContents> -
Reads the file at
filePathand returns its contents as aFileContentsobject. -
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited